https://codereview.appspot.com/18920045/diff/20001/app/widgets/charm-search.js#newcode273
app/widgets/charm-search.js:273: this.ac._onItemClick = function(ev) {
This is the giant hack to make this all work. Clicking anything in here
is touch because it fires a AC "itemSelect" event regardless of where
you click. The only way to NOT fire an itemSelect on here is to override
the original method and do the check/work here.
Review comments
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ browser. js browser/ browser. js (right):
File app/subapps/
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ browser. js#newcode542 browser/ browser. js:542: extraCfg.deploy = 'deployBundle' );
app/subapps/
this.get(
Only set one deploy method on the details view. They can share the same
code for this. Just the deploy method needs to be different.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ browser. js#newcode708 browser/ browser. js:708: extraCfg.deploy =
app/subapps/
this.get('deploy');
pass the deploy methods into the sidebar/fullscreen views so that they
can use quicksearch to perform a deploy (vs the typical path from
details view or drag/drop)
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ browser. js#newcode800 browser/ browser. js:800: deployBundle: 'deployBundle' )
app/subapps/
this.get(
See above
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ browser. js#newcode1165 browser/ browser. js:1165: deployBundle: {},
app/subapps/
document all the things!
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ views/bundle. js browser/ views/bundle. js (right):
File app/subapps/
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ views/bundle. js#newcode76 browser/ views/bundle. js:76: 'deploy' )(bundle. get('data' ));
app/subapps/
this.get(
so this changes to just deploy vs a diff method
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ views/view. js browser/ views/view. js (right):
File app/subapps/
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ views/view. js#newcode93 browser/ views/view. js:93: );
app/subapps/
no idea why there were two different "if search" checks. Block them into
one.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ views/view. js#newcode101 browser/ views/view. js:101: this.search.on(
app/subapps/
this is the new event the search-widget grew to handle the deploy
selection.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/subapps/ browser/ views/view. js#newcode140 browser/ views/view. js:140: _deployEntity: function(ev) {
app/subapps/
mostly just sharing what the details views for bundles/charms do.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/templates/ bundle- token.handlebar s bundle- token.handlebar s (right):
File app/templates/
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/templates/ bundle- token.handlebar s#newcode4 bundle- token.handlebar s:4: {{#if deployButton}}
app/templates/
the token only displays this when requested. The search widget passes
this in for use and other token uses don't care.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/templates/ bundle- token.handlebar s#newcode5 bundle- token.handlebar s:5: {{#ifFlag 'searchDeploy'}}
app/templates/
we only feature flag the UX since it's a UX driven feature. Simpler than
FF'ing all the code.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/views/ utils.js
File app/views/utils.js (right):
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/views/ utils.js# newcode1567 utils.js: 1567: * {{#ifFlag 'flag_name'}} {{/ifFlag}}
app/views/
Document the real usage.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/widgets/ charm-search. js charm-search. js (right):
File app/widgets/
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/widgets/ charm-search. js#newcode212 charm-search. js:212: deployButton: charm.get( 'id')) ? false : true
app/widgets/
isCategory(
note that we don't set the deployButton for the category options in the
result set.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/widgets/ charm-search. js#newcode273 charm-search. js:273: this.ac. _onItemClick = function(ev) {
app/widgets/
This is the giant hack to make this all work. Clicking anything in here
is touch because it fires a AC "itemSelect" event regardless of where
you click. The only way to NOT fire an itemSelect on here is to override
the original method and do the check/work here.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/widgets/ charm-search. js#newcode330 charm-search. js:330: } else {
app/widgets/
this is what the original method does. So had to dupe these 3 lines from
YUI itself.
https:/ /codereview. appspot. com/18920045/ diff/20001/ app/widgets/ charm-search. js#newcode372 charm-search. js:372: if (ev.result. raw.charm) {
app/widgets/
this is a drive-by to make selecting a quicksearch result for a bundle
to work. We have to generate the 'bundle' charmId to use.
https:/ /codereview. appspot. com/18920045/ diff/20001/ lib/views/ browser/ bws-searchbox. less browser/ bws-searchbox. less (right):
File lib/views/
https:/ /codereview. appspot. com/18920045/ diff/20001/ lib/views/ browser/ bws-searchbox. less#newcode69 browser/ bws-searchbox. less:69: .token.tiny {
lib/views/
drive by fixing some alignment of the text in the quicksearch results so
they're centered better.
https:/ /codereview. appspot. com/18920045/ diff/20001/ test/test_ browser_ search_ widget. js browser_ search_ widget. js (right):
File test/test_
https:/ /codereview. appspot. com/18920045/ diff/20001/ test/test_ browser_ search_ widget. js#newcode209 browser_ search_ widget. js:209: cleanIconHelper = IconPath( );
test/test_
utils.stubCharm
this can go away. Left over from debugging an issue.
https:/ /codereview. appspot. com/18920045/