Ember.js Multiple Selection on Click -- Dropdown Menu - ember.js

New to ember but trying to figure out how to allow selections on click. Once selected, I want to have the ability to select 'Remove' from the actions dropdown to remove the images from the store. Is this possible or do I have to revert to a checkbox somewhere?
Gist Here
JSBin Here

Try this out: http://jsbin.com/pezikuji/2/
What I've basically done in this update was bind a property called "isSelected" from your model to your view.
I'm then using that property in ImagesController to create a computed property called canDelete. This is used by the template in an if statement to show/hide a menu item.
Hope that helps!

Related

Sitecore Rendering Datasource: Filter immediate children

I have a rendering and I want to restrict the items that are displayed in the datasource selection dialog UI. I want to restrict the datasource to the immediate children of the context item AND to a specific template. So I've set Datasource Location on the rendering to ./. and specified the
Datasource Template to the required template.
The issue is, when i click to select a datasource, i see all immediate children including onces that are not of the template. Even though sitecore disables the "OK" button when i click other templates, its unnecessary noise. Additionally, I can even navigate to any of the descendants and select an item of that template. This wont work, as i want to restrict the selection to only the immediate children.
Any pointers?
FYI, im using sitecore 8.1
Thanks
After some playing around i got it working by providing a query on the Datasource Location
I set it to: query:./*[##templatename='x']

Django multi-select widget. Add arbitrary select components

i would like to make a widget that lets the user select a value from a drop-down list and then add new drop-down lists with values filtered based on the previous selections. I don't know where to start from....
If the amount of drop-downs is finite and determinable by the time you develop the software (e.g. selecting country->city->street) I would suggest to:
add all the extra dropdowns (without data yet) to your form, make sure they are hidden
use jqueryui to un-hide and populate the dropdowns as needed using ajax
Don't forget to disable/hide the whole form by default and only show it if JS is enabled in browser.
Also, you will of course need another view, with which only ajax speaks.
Here for you to catch the idea how the stuff should work. Sorry don't know if they have anything more similar. But: user selects something -> jquery requests data for the next dropdown -> jquery displays next populated dropdown.

same dynamic action for multiple buttons APEX 5.0

I have a apex report page where there are multiple submit buttons for each region of charts display. Each submit button is supposed to have same dynamic actions- the dynamic action is supposed to run if user does not selects any data so an error message will pop up and this dynamic action I want to work for all the buttons, so instead of adding dynamic action which is common for every button , I want to define it somewhere in the code so that it can be called during click of any button.
How this can be done?
What you can do is assign the same CSS class to all the buttons you want your dynamic action to fire on. Let's say you assign a class .mybutton to all the buttons in your chart regions.
Second create your dynamic action.
Event: Click
Selection Type: jQuery Selector
jQuery Selector: .mybutton
Define the condition if you need to. Go on with Action etc.
So now your dynamic action will be fired whenever the user clicks on a button with the .mybutton class.
If you need to identify each button by ID when clicked and your action is Execute JavaScript Code, you can use thisTriggeringElement.id.
For the particular Dynamic Action, in Condition region, under Condition Type you can select Request is contained within Expression 1 and give your request(button request) in Expression 1

Add a custom dropdown list in Sitecore PageEditor

How can a custom dropdown list be added to the page editor in Sitecore?
I understand that you can create individual buttons in the toolbar by creating items under /sitecore/content/Applications/WebEdit/Custom Experience Buttons in the core DB using the WebEdit Button template and I understand that setting a button's Type field to Common will make it appear under the 'More' dropdown, but what I want is to create my own dropdown button with a unique list of buttons (corresponding to items in the master DB).
I've looked at the various processors in the <getChromeData> pipeline using dotPeek and suspect I will have to create a new processor in this pipeline, but I cannot find the relevant code which produces the 'More' dropdown list from the image.
Create a button of template type /sitecore/templates/System/WebEdit/WebEdit Button and set Type field to Common from the droplist. The button should then appear in the dropdown.

O365 Custom Ribbon Action - Disable button until item selected

I'm trying to only enable my custom ribbon button when an item is selected, but it looks like you can't do JavaScript in O365 from everything that I've read. Is this true? Is there no way to enable/disable a button based on the item(s) selected?
You can use custom Page components to do that. There's an execellent article in DIWUG magazine issue 6 on how to do it. http://www.diwug.nl/DIWUG_SharePoint_eMagazine6.pdf