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

Option to show/ hide edit mode #68

Closed
nunos7 opened this issue Feb 26, 2015 · 5 comments
Closed

Option to show/ hide edit mode #68

nunos7 opened this issue Feb 26, 2015 · 5 comments
Assignees

Comments

@nunos7
Copy link
Contributor

nunos7 commented Feb 26, 2015

Hi Sebastian,
Is it possible to have an option to show/ hide the edit option?
In my testing page i've created a variable allowEdit = false and then i've setted her to the model object. In dashboard.html, i've setted ng-if="model.allowEdit" to the span DOM object.
This works, but i don't know if it's the more elegant solution?

Thanks,
NS

@sdorra sdorra self-assigned this Feb 26, 2015
@sdorra
Copy link
Member

sdorra commented Feb 26, 2015

I think a better way is to use an attribute for the adf-dashboard directive, this would be analog to the collapsible option.

@nunos7
Copy link
Contributor Author

nunos7 commented Feb 27, 2015

Hi,
A good improvement was to put both the "collapsible" and "allowEdit" individual by widget and/ or global by dashboard.
The global option in dashboard should be mandatory on the individual option of the widget.

Thanks,
NS

@sdorra
Copy link
Member

sdorra commented Feb 27, 2015

You can now use the editable attribute on the adf-dashboard directive for example:

<adf-dashboard editable="false" ...

Or with expression:

<adf-dashboard editable="{{scopeVar}}" ...

@nunos7 each widget can control if it is editable or not, by adding the edit property. If the edit property is missing, only the title can be changed. I think the collapsible option for individual widgets, does not make much sense.

@sdorra sdorra closed this as completed Feb 27, 2015
@nunos7
Copy link
Contributor Author

nunos7 commented Mar 2, 2015

You rock.

NS

@RajaGowthu
Copy link

Could someone help me how to hide settings(cog) icon for specific widget in my dashboard.

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants