-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#90] UI issues #154
[#90] UI issues #154
Conversation
if (scope.visualization) { | ||
link += '#' + scope.visualization.id; | ||
} | ||
element.find('a').attr('href', link); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use ng-href
, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what I did initially, but:
<a ng-href="/queries/{{query.id}}#{{visualization.id}}"></a>
will render with a trailing # when no visualization: /queries/123#
and I don't like it 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, bind ng-href
with some scope property which will contain the final URL that the directive generates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but that would beat the purpose of using a directive. I want to have /queries/
written in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why will it be written in more than one place this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<query-link hrefValue="/queries/{{query1.id}}#{{visualization1.id}}"></query-link>
<query-link hrefValue="/queries/{{query2.id}}#{{visualization2.id}}"></query-link>
is that what you mean?
On Wed, Mar 26, 2014 at 1:32 PM, Arik Fraimovich
notifications@github.comwrote:
In rd_ui/app/scripts/directives/query_directives.js:
- function queryLink() {
- return {
restrict: 'E',
scope: {
'query': '=?',
'visualization': '=?'
},
}}',template: '<a>{{query.name
link: function(scope, element) {
scope.query = scope.query || scope.$parent.query;
var link = '/queries/' + scope.query.id;
if (scope.visualization) {
link += '#' + scope.visualization.id;
}
element.find('a').attr('href', link);
Why will it be written in more than one place this way?
Reply to this email directly or view it on GitHubhttps://github.com//pull/154/files#r10972230
.
http://everything.me/
Amir Nissim
Front End Developer, EverythingMe http://everything.me/
amirn@everything.me amirn@everything.me +972 52 6342974
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I meant that in queryLink's template you will use ng-href.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what I did initially, but:
<a ng-href="/queries/{{query.id}}#{{visualization.id}}"></a>
will render with a trailing # when no visualization: /queries/123# and I don't like it 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 40adba4
[#90] save only modified fields when changing query name/description
[getredash#90] save only modified fields when changing query name/description
No description provided.