Skip to content
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

Merged
merged 11 commits into from
Mar 26, 2014
Merged

[#90] UI issues #154

merged 11 commits into from
Mar 26, 2014

Conversation

amirnissim
Copy link
Contributor

No description provided.

if (scope.visualization) {
link += '#' + scope.visualization.id;
}
element.find('a').attr('href', link);
Copy link
Member

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?

Copy link
Contributor Author

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 👎

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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 👎

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 40adba4

arikfr added a commit that referenced this pull request Mar 26, 2014
[#90] save only modified fields when changing query name/description
@arikfr arikfr merged commit ff9fadd into master Mar 26, 2014
@amirnissim amirnissim changed the title [#90] save only modified fields when changing query name/description [#90] UI issues Mar 27, 2014
christophervalles pushed a commit to hailocab/redash that referenced this pull request May 8, 2014
[getredash#90] save only modified fields when changing query name/description
washort pushed a commit to washort/redash that referenced this pull request Dec 13, 2017
washort pushed a commit to washort/redash that referenced this pull request Jan 8, 2018
washort pushed a commit to washort/redash that referenced this pull request Jan 9, 2018
washort pushed a commit to washort/redash that referenced this pull request Apr 30, 2018
washort pushed a commit to washort/redash that referenced this pull request May 31, 2018
washort pushed a commit to washort/redash that referenced this pull request Aug 11, 2018
alison985 added a commit to StantonVentures/redash that referenced this pull request Aug 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants