2 Edits, 1 new
[webos-internals:modifications.git] / universal-search / universal-search-command-line.patch
1 Index: /usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
2 ===================================================================
3 --- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
4 +++ /usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
5 @@ -125,6 +125,7 @@
6                 searchesDiv.update(Mojo.View.render({template: 'global-search/expanded-searches-div' }));
7                 this.expandedSearchDrawer = { showExpanded: false };
8                 this.controller.setupWidget('expanded_searches_drawer', {unstyled:true, property:'showExpanded'}, this.expandedSearchDrawer);
9 +
10                 this.webDrawer = { showWeb: false };
11                 this.controller.setupWidget('web_drawer', {unstyled:true, property:'showWeb'}, this.webDrawer);
12                 
13 @@ -160,9 +161,47 @@
14                 
15                 this.controller.listen(this.controller.document, 'paste', this.onPaste.bindAsEventListener(this), true);
16                 
17 +               this.commandLine = new CommandLine();
18 +               
19 +               var searchesDivUSCL = this.controller.get('searches-list-uscl');
20 +               searchesDivUSCL.update(Mojo.View.render({template: 'global-search/expanded-searches-div-uscl' }));
21 +               this.expandedSearchDrawerUSCL = { showExpanded: false };
22 +               this.controller.setupWidget('expanded_searches_drawer_uscl',
23 +                                           { unstyled:true, property:'showExpanded', 
24 +                                             scrollDisabled: true},
25 +                                           this.expandedSearchDrawerUSCL);
26 +
27 +               this.commandLineDrawer = { showCommandLine: false };
28 +               this.controller.setupWidget('command_line_drawer', {unstyled: true, property: 'showCommandLine'}, this.commandLineDrawer);
29 +
30 +               this.usclSearchesAttrs = {
31 +                       listTemplate: "global-search/templates/uscl-searches-list",
32 +                       itemTemplate: "global-search/templates/uscl-searches-item",
33 +                       swipeToDelete: false,
34 +                       reorderable: false,
35 +                       renderLimit: 500
36 +               };
37 +               this.usclSearchesModel = { 
38 +                       items: this.commandLine.universalSearchList 
39 +               };
40 +               this.controller.setupWidget("usclSearches",
41 +                                           this.usclSearchesAttrs,
42 +                                           this.usclSearchesModel);
43 +
44 +               this.onTapUSCLHandler = this.onTapUSCL.bindAsEventListener(this);
45 +               this.controller.listen("usclSearches",
46 +                                      Mojo.Event.listTap,
47 +                                      this.onTapUSCLHandler);
48 +               
49                 this.initOnServerStart("com.palm.systemservice");
50         },
51    
52 +       onTapUSCL: function (event) {
53 +               var entry = this.usclSearchesModel.items[event.index];
54 +               this.runCommandLine({ entry: entry,
55 +                                     arg: this.currentFilter });
56 +       },
57 +  
58         ready: function() {
59                 // try to force our input field to always have focus (there are some exceptions)
60                 var input = this.searchField.querySelector('[name=searchtermInput]');
61 @@ -170,6 +209,21 @@
62                         input.blur = function() { this.focus(); }
63                 }
64                 this.enable(true);
65 +               this.monkeyPatch1();
66 +       },
67 +
68 +       /* allows one to disable the scrollIntoView behavior of Mojo.Widget.Drawer. */
69 +       /* WARNING: THIS MONKEY-PATCHES A PRIVATE API */
70 +       monkeyPatch1: function () {
71 +               if (this.monkeyPatched) { return; }
72 +               var monkey = Mojo.Widget.Drawer.prototype.scrollIntoView;
73 +               if (!monkey) { return; }
74 +               Mojo.Widget.Drawer.prototype.scrollIntoView = function () {
75 +                       if (this.controller.attributes.scrollDisabled) {
76 +                               return;
77 +                       }
78 +                       monkey.apply(this, arguments);
79 +               };
80         },
81         
82         isEnabled: function() {
83 @@ -1353,6 +1407,66 @@
84                 ApplicationService.launch('com.palm.app.browser', params);              
85         },      
86         
87 +       deactivateWithError: function (message) {
88 +               this.controller.showAlertDialog({
89 +                       onChoose: (function () { this.deactivate(); }).bind(this),
90 +                       title: "Error",
91 +                       message: message,
92 +                       choices: [ { label: "OK", value: "ok" } ]
93 +               });
94 +       },
95 +
96 +       runCommandLine: function (o) {
97 +               if (!this.commandLine) {
98 +                       this.deactivate();
99 +               }
100 +               var result;
101 +               try {
102 +                       if (o instanceof Object) {
103 +                               result = this.commandLine.run(o.entry, o.arg);
104 +                       }
105 +                       else {
106 +                               result = this.commandLine.runString(o);
107 +                       }
108 +               }
109 +               catch (e) {
110 +                       if (e instanceof CommandLineError) {
111 +                               this.deactivateWithError(e.message);
112 +                               /* remember, kids, don't deactivate right away! */
113 +                               return;
114 +                       }
115 +                       else {
116 +                               throw e;
117 +                       }
118 +               }
119 +               if (!result) {
120 +                       this.deactivate();
121 +               }
122 +               else if (result instanceof Function) {
123 +                       this.deactivate();
124 +                       result.apply(this);
125 +               }
126 +               else if (result instanceof Object) {
127 +                       this.controller.showAlertDialog({
128 +                               onChoose: (function () { this.deactivate(); }).bind(this),
129 +                               title: result.title,
130 +                               message: result.message,
131 +                               choices: [ { label: "OK", value: "ok" } ]
132 +                       });
133 +               }
134 +               else if (result.constructor && result.constructor === String) {
135 +                       this.controller.showAlertDialog({
136 +                               onChoose: (function () { this.deactivate(); }).bind(this),
137 +                               title: "Result",
138 +                               message: result,
139 +                               choices: [ { label: "OK", value: "ok" } ]
140 +                       });
141 +               }
142 +               else {
143 +                       this.deactivate();
144 +               }
145 +       },
146 +
147         toggleSearchListDivs: function() {
148                 if(!this.enterKeyActionItem){
149                         this.enterKeyActionItem = 'search'
150 @@ -1363,16 +1477,37 @@
151                                         $('webtext').innerHTML = this.currentFilter;
152                                         this.webDrawer.showWeb = true;
153                                         this.controller.modelChanged(this.webDrawer);
154 +                                       this.commandLineDrawer.showCommandLine = false;
155 +                                       this.controller.modelChanged(this.commandLineDrawer);
156 +                               }
157 +                               else if (this.commandLine.isCommandLineString(this.currentFilter)) {
158 +                                       $('commandlinetext').innerHTML = this.currentFilter;
159 +                                       this.webDrawer.showWeb = false;
160 +                                       this.controller.modelChanged(this.webDrawer);
161 +                                       this.commandLineDrawer.showCommandLine = true;
162 +                                       this.controller.modelChanged(this.commandLineDrawer);
163                                 }
164                                 else {
165                                         this.webDrawer.showWeb =  false ;
166                                         this.controller.modelChanged(this.webDrawer);
167 +                                       this.commandLineDrawer.showCommandLine = false;
168 +                                       this.controller.modelChanged(this.commandLineDrawer);
169                                 }
170                                 $('find').removeClassName('single');
171                                 $('find').addClassName('first');
172                                 this.searchField.removeClassName('text-hidden');
173                                 this.expandedSearchDrawer.showExpanded = true;
174                                 this.controller.modelChanged(this.expandedSearchDrawer);
175 +
176 +                               if (this.commandLine.show) {
177 +                                       this.controller.get('searchesDivUSCL').show();
178 +                                       this.expandedSearchDrawerUSCL.showExpanded = true;
179 +                               }
180 +                               else {
181 +                                       this.controller.get('searchesDivUSCL').hide();
182 +                                       this.expandedSearchDrawerUSCL.showExpanded = false;
183 +                               }
184 +                               this.controller.modelChanged(this.expandedSearchDrawerUSCL);
185                         } else {//find...
186                                 if (this.dialDiv.visible() || this.numberDiv.visible()) {
187                                         this.searchField.addClassName('text-hidden');
188 @@ -1382,6 +1517,11 @@
189                                 }
190                                 this.expandedSearchDrawer.showExpanded = false;
191                                 this.controller.modelChanged(this.expandedSearchDrawer);
192 +
193 +                               this.controller.get('searchesDivUSCL').hide();
194 +                               this.expandedSearchDrawerUSCL.showExpanded = false;
195 +                               this.controller.modelChanged(this.expandedSearchDrawerUSCL);
196 +
197                                 $('find').removeClassName('first');
198                                 $('find').addClassName('single');
199                         }
200 @@ -1396,16 +1536,36 @@
201                                         $('webtext').innerHTML = this.currentFilter;
202                                         this.webDrawer.showWeb = true;
203                                         this.controller.modelChanged(this.webDrawer);
204 +                                       this.commandLineDrawer.showCommandLine = false;
205 +                                       this.controller.modelChanged(this.commandLineDrawer);
206 +                               }
207 +                               else if (this.commandLine.isCommandLineString(this.currentFilter)) {
208 +                                       $('commandlinetext').innerHTML = this.currentFilter;
209 +                                       this.webDrawer.showWeb = false;
210 +                                       this.controller.modelChanged(this.webDrawer);
211 +                                       this.commandLineDrawer.showCommandLine = true;
212 +                                       this.controller.modelChanged(this.commandLineDrawer);
213                                 }
214                                 else {
215                                         this.webDrawer.showWeb = false;
216                                         this.controller.modelChanged(this.webDrawer);
217 +                                       this.commandLineDrawer.showCommandLine = false;
218 +                                       this.controller.modelChanged(this.commandLineDrawer);
219                                 }
220                                 $('find').removeClassName('single');
221                                 $('find').addClassName('first');
222                                 this.searchField.removeClassName('text-hidden');
223                                 this.expandedSearchDrawer.showExpanded = true;
224                                 this.controller.modelChanged(this.expandedSearchDrawer);
225 +                               if (this.commandLine.show) {
226 +                                       this.controller.get('searchesDivUSCL').show();
227 +                                       this.expandedSearchDrawerUSCL.showExpanded = true;
228 +                               }
229 +                               else {
230 +                                       this.controller.get('searchesDivUSCL').hide();
231 +                                       this.expandedSearchDrawerUSCL.showExpanded = false;
232 +                               }
233 +                               this.controller.modelChanged(this.expandedSearchDrawerUSCL);
234                         } else {//find...
235                                 if (this.dialDiv.visible() || this.numberDiv.visible()) {
236                                         this.searchField.addClassName('text-hidden');
237 @@ -1415,6 +1575,11 @@
238                                 }
239                                 this.expandedSearchDrawer.showExpanded = false;
240                                 this.controller.modelChanged(this.expandedSearchDrawer);
241 +
242 +                               this.controller.get('searchesDivUSCL').hide();
243 +                               this.expandedSearchDrawerUSCL.showExpanded = false;
244 +                               this.controller.modelChanged(this.expandedSearchDrawerUSCL);
245 +
246                                 $('find').removeClassName('first');
247                                 $('find').addClassName('single');
248                         }
249 @@ -1434,6 +1599,11 @@
250                                 this.searchExplicitlyExpanded = false;
251                                 this.expandedSearchDrawer.showExpanded = false;
252                                 this.controller.modelChanged(this.expandedSearchDrawer);
253 +
254 +                               this.controller.get('searchesDivUSCL').hide();
255 +                               this.expandedSearchDrawerUSCL.showExpanded = false;
256 +                               this.controller.modelChanged(this.expandedSearchDrawerUSCL);
257 +
258                                 $('find').removeClassName('first');
259                                 $('find').addClassName('single');
260                                 if (this.dialDiv.visible() || this.numberDiv.visible()) {
261 @@ -1449,21 +1619,44 @@
262                                         $('webtext').innerHTML = this.currentFilter;
263                                         this.webDrawer.showWeb = true;
264                                         this.controller.modelChanged(this.webDrawer);
265 +                                       this.commandLineDrawer.showCommandLine = false;
266 +                                       this.controller.modelChanged(this.commandLineDrawer);
267 +                               }
268 +                               else if (this.commandLine.isCommandLineString(this.currentFilter)) {
269 +                                       $('commandlinetext').innerHTML = this.currentFilter;
270 +                                       this.webDrawer.showWeb = false;
271 +                                       this.controller.modelChanged(this.webDrawer);
272 +                                       this.commandLineDrawer.showCommandLine = true;
273 +                                       this.controller.modelChanged(this.commandLineDrawer);
274                                 }
275                                 else {
276                                         this.webDrawer.showWeb = false;
277                                         this.controller.modelChanged(this.webDrawer);
278 +                                       this.commandLineDrawer.showCommandLine = false;
279 +                                       this.controller.modelChanged(this.commandLineDrawer);
280                                 }
281                                 $('find').removeClassName('single');
282                                 $('find').addClassName('first');
283                                 this.searchField.removeClassName('text-hidden');
284                                 this.expandedSearchDrawer.showExpanded = true;
285                                 this.controller.modelChanged(this.expandedSearchDrawer);
286 +
287 +                               if (this.commandLine.show) {
288 +                                       this.controller.get('searchesDivUSCL').show();
289 +                                       this.expandedSearchDrawerUSCL.showExpanded = true;
290 +                               }
291 +                               else {
292 +                                       this.controller.get('searchesDivUSCL').hide();
293 +                                       this.expandedSearchDrawerUSCL.showExpanded = false;
294 +                               }
295 +                               this.controller.modelChanged(this.expandedSearchDrawerUSCL);
296                         }
297                 } else {
298                         var url = target.id;
299                         if (url == "web")
300                                 this.launchBrowser(this.currentFilter);
301 +                       else if (url == "commandLine")
302 +                               this.runCommandLine(this.currentFilter);
303                 }
304         },
305         
306 @@ -1716,6 +1909,13 @@
307                 this.gpsInfo = undefined;
308                 if(this.highlightTarget != null)
309                         this.highlightTarget.removeClassName('selected');
310 +
311 +               this.commandLineDrawer.showCommandLine =  false ;
312 +               this.controller.modelChanged(this.commandLineDrawer);
313 +               this.controller.get('searchesDivUSCL').hide();
314 +               this.expandedSearchDrawerUSCL.showExpanded = false;
315 +               this.controller.modelChanged(this.expandedSearchDrawerUSCL);
316 +               $('commandLine').removeClassName('selected');
317         },
318         
319    webSiteString: function(s){
320 @@ -1815,6 +2015,7 @@
321         //clear search':
322         $(this.defaultSearchEngine).removeClassName('palm-focus');
323         $('web').removeClassName('palm-focus');
324 +       $('commandLine').removeClassName('palm-focus');
325    },
326    highlightSelection: function() {
327         
328 @@ -1888,6 +2089,24 @@
329                 $(this.defaultSearchEngine).removeClassName('palm-focus');
330                 $('web').removeClassName('palm-focus');
331         }
332 +
333 +       if (this.enterKeyActionItem === "search") {
334 +               if (this.webDrawer.showWeb == true) {
335 +                       $('commandLine').removeClassName('palm-focus');
336 +               }
337 +               else if (this.commandLineDrawer.showCommandLine == true) {
338 +                       $(this.defaultSearchEngine).removeClassName('palm-focus');
339 +                       $('web').removeClassName('palm-focus');
340 +                       this.highlightTarget = $('commandLine');
341 +                       $('commandLine').addClassName('palm-focus');
342 +               }
343 +               else if (this.expandedSearchDrawer.showExpanded == true) {
344 +                       $('commandLine').removeClassName('palm-focus');
345 +               }
346 +       }
347 +       else {
348 +               $('commandLine').removeClassName('palm-focus');
349 +       }
350    },
351    
352    enterKeyAction: function(){
353 @@ -1976,6 +2195,8 @@
354                         }
355                         if (this.webDrawer.showWeb == true)
356                                 this.launchBrowser(this.currentFilter);
357 +                       else if (this.commandLineDrawer.showCommandLine == true)
358 +                               this.runCommandLine(this.currentFilter);
359                         else {
360                                 this.launchBrowser(this.URLs[this.defaultSearchEngine] + encodeURIComponent(this.currentFilter));
361                         }
362 Index: /usr/lib/luna/system/luna-applauncher/app/controllers/uscl-help-command-list.js
363 ===================================================================
364 --- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/uscl-help-command-list.js
365 +++ /usr/lib/luna/system/luna-applauncher/app/controllers/uscl-help-command-list.js
366 @@ -0,0 +1,39 @@
367 +/*jslint browser: true, eqeqeq: true, undef: true */
368 +/*global Mojo */
369 +/******************************************************************************
370 +Lines above are for jslint, the JavaScript verifier.
371 +http://www.jslint.com/
372 +******************************************************************************/
373 +
374 +function UsclHelpCommandListAssistant (commandLine) {
375 +       this.commandLine = commandLine;
376 +}
377 +
378 +UsclHelpCommandListAssistant.prototype.setup = function () {
379 +       this.stageController = this.controller.stageController;
380 +       this.items = this.commandLine.helpCommandList;
381 +       this.controller.setupWidget("command-list", {
382 +               listTemplate: "uscl-help-command-list/templates/list",
383 +               itemTemplate: "uscl-help-command-list/templates/item",
384 +               swipeToDelete: false,
385 +               reorderable: false,
386 +               renderLimit: this.items.length
387 +       }, this.itemsModel = {
388 +               items: this.items
389 +       });
390 +
391 +       this.showCommandHandler = this.showCommand.bindAsEventListener(this);
392 +       this.controller.listen("command-list", Mojo.Event.listTap,
393 +                              this.showCommandHandler);
394 +};
395 +
396 +UsclHelpCommandListAssistant.prototype.showCommand = function (event) {
397 +       this.stageController.pushScene("uscl-help-command-view",
398 +                                      this.items, event.index);
399 +};
400 +
401 +UsclHelpCommandListAssistant.prototype.cleanup = function () {
402 +       this.controller.stopListening("command-list", Mojo.Event.listTap,
403 +                                     this.showCommandHandler);
404 +};
405 +
406 Index: /usr/lib/luna/system/luna-applauncher/app/controllers/uscl-help-command-view.js
407 ===================================================================
408 --- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/uscl-help-command-view.js
409 +++ /usr/lib/luna/system/luna-applauncher/app/controllers/uscl-help-command-view.js
410 @@ -0,0 +1,29 @@
411 +/*jslint browser: true, eqeqeq: true, undef: true */
412 +/*global Mojo */
413 +/******************************************************************************
414 +Lines above are for jslint, the JavaScript verifier.
415 +http://www.jslint.com/
416 +******************************************************************************/
417 +
418 +function UsclHelpCommandViewAssistant (items, index) {
419 +       this.items = items;
420 +       this.item = this.items[index];
421 +}
422 +
423 +UsclHelpCommandViewAssistant.prototype.setup = function () {
424 +       this.stageController = this.controller.stageController;
425 +       this.controller.get("title").innerHTML =
426 +               this.item.title;
427 +       this.controller.get("description").innerHTML =
428 +               this.item.description;
429 +       this.controller.get("usage").innerHTML = this.item.usageHTML;
430 +       if (!this.item.example || this.item.example === "") {
431 +               this.controller.get("exampleDiv").hide();
432 +       }
433 +       else {
434 +               this.controller.get("example").innerHTML = this.item.exampleHTML;
435 +       }
436 +
437 +       document.body.style.backgroundImage = null;
438 +};
439 +
440 Index: /usr/lib/luna/system/luna-applauncher/app/controllers/uscl.js
441 ===================================================================
442 --- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/uscl.js
443 +++ /usr/lib/luna/system/luna-applauncher/app/controllers/uscl.js
444 @@ -0,0 +1,527 @@
445 +/*jslint browser: true, eqeqeq: true, undef: true, evil: true */
446 +/*global Mojo, Class */
447 +/******************************************************************************
448 +Lines above are for jslint, the JavaScript verifier.
449 +http://www.jslint.com/
450 +******************************************************************************/
451 +
452 +if (!String.prototype.trim) {
453 +       String.prototype.trim = function () {
454 +               return this.replace(/^\s+/, "").replace(/\s+$/, "");
455 +       };
456 +}
457 +
458 +var CommandLineError = function (message) {
459 +       Error.apply(this, arguments);
460 +       this.message = message; // ugh, why on Earth do I have to do this?
461 +};
462 +CommandLineError.prototype = new Error();
463 +CommandLineError.prototype.constructor = CommandLineError;
464 +CommandLineError.prototype.name = "CommandLineError";
465 +
466 +var CommandLine = Class.create({
467 +       initialize: function (options) {
468 +               this.build(options);
469 +               this.show = false;
470 +               this.loadPreferences();
471 +       },
472 +
473 +       loadPreferences: function () {
474 +               this.db = new Mojo.Depot({ name: "uscl", replace: false },
475 +                                        this.onLoadDatabase.bind(this),
476 +                                        function () { /* don't care */ });
477 +       },
478 +
479 +       onLoadDatabase: function () {
480 +               this.db.get("show", 
481 +                           (function (o) { this.show = o; }).bind(this),
482 +                           (function () { this.show = false; }).bind(this));
483 +       },
484 +
485 +       setShow: function (flag) {
486 +               this.show = flag;
487 +               this.db.add("show", flag, 
488 +                           function () { /* don't care */ },
489 +                           function () { /* don't care */ });
490 +       },
491 +
492 +       categories: [
493 +               { name: "search", title: "Search" },
494 +               { name: "reference", title: "Reference" },
495 +               { name: "utilities", title: "Utilities" },
496 +               { name: "system", title: "System" }
497 +       ],
498 +
499 +       entries: {
500 +               "calc": {
501 +                       title: "Calculator",
502 +                       usage: "<var>expression</var>",
503 +                       example: "(37 * 1.8) + 32 * Math.sin(Math.PI / 2)",
504 +                       description: "Perform a calculation.  " + 
505 +                               "Can also evaluate other JavaScript expressions.  " + 
506 +                               "More complex calculations (such as unit conversions) " + 
507 +                               "can be sent to Google (see .google).",
508 +                       method: function (s) {
509 +                               // Yes, I'm aware that eval is usually
510 +                               // evil.  The user chooses to use 'calc'
511 +                               // at their own risk.  I'm only using it
512 +                               // here because I'm too lazy at the
513 +                               // moment to write an infix expression
514 +                               // calculator.
515 +                               var result;
516 +                               try {
517 +                                       result = eval(s);
518 +                               }
519 +                               catch (e) {
520 +                                       return {
521 +                                               title: "Error",
522 +                                               message: e
523 +                                       };
524 +                               }
525 +                               return {
526 +                                       title: "Calculator",
527 +                                       message: s + " \u2192 " + Object.toJSON(result)
528 +                               };
529 +                       },
530 +                       noArguments: {
531 +                               appId: "com.palm.app.calculator"
532 +                       }
533 +               },
534 +               "c": "calc",
535 +               "eval": "calc",
536 +
537 +               "imdb": {
538 +                       title: "IMDB.com",
539 +                       usage: "<var>query</var>",
540 +                       example: "the big lebowski",
541 +                       description: "Find something on IMDB.com.",
542 +                       url: "http://www.imdb.com/find?s=all&q=",
543 +                       noArguments: {
544 +                               url: "http://www.imdb.com/"
545 +                       }
546 +               },
547 +
548 +               "dict": {
549 +                       title: "Dictionary.com",
550 +                       usage: "<var>word</var>",
551 +                       example: "ebullient",
552 +                       description: "Find a word on Dictionary.com.",
553 +                       url: "http://m.reference.com/d/search.html?q=",
554 +                       noArguments: {
555 +                               url: "http://m.reference.com/d/"
556 +                       }
557 +               },
558 +               "d": "dict",
559 +
560 +               "thes": {
561 +                       title: "Thesaurus.com",
562 +                       usage: "<var>word</var>",
563 +                       example: "ebullient",
564 +                       description: "Find a word on Thesaurus.com.",
565 +                       url: "http://m.reference.com/t/search.html?q=",
566 +                       noArguments: {
567 +                               url: "http://m.reference.com/t/"
568 +                       }
569 +               },
570 +               "th": "thes",
571 +
572 +               "beer": {
573 +                       title: "BeerAdvocate",
574 +                       usage: "<var>beer</var>",
575 +                       example: "leine's sunset wheat",
576 +                       description: "Find a beer on BeerAdvocate.com.",
577 +                       url: "http://www.google.com/m/search?client=ms-palm-webOS&channel=iss&q=site:beeradvocate.com%20",
578 +                       noArguments: {
579 +                               url: "http://www.beeradvocate.com/"
580 +                       }
581 +               },
582 +               "ba": "beer",
583 +
584 +               "ratebeer": {
585 +                       title: "RateBeer",
586 +                       usage: "<var>beer</var>",
587 +                       example: "schlenkerla urbock",
588 +                       description: "Find a beer on RateBeer.com.",
589 +                       url: "http://www.google.com/m/search?client=ms-palm-webOS&channel=iss&q=site:ratebeer.com%20",
590 +                       noArguments: {
591 +                               url: "http://www.ratebeer.com/"
592 +                       }
593 +               },
594 +               "rb": "ratebeer",
595 +
596 +               "ebay": {
597 +                       title: "eBay",
598 +                       usage: "<var>item</var>",
599 +                       example: "mp3 player",
600 +                       description: "Find something on eBay.com.",
601 +                       url: "http://m.ebay.com/Pages/SearchResults.aspx?emvAD=320x320&emvcc=0&sv=",
602 +                       noArguments: {
603 +                               url: "http://m.ebay.com/"
604 +                       }
605 +               },
606 +
607 +               "yahoo": {
608 +                       title: "Yahoo!",
609 +                       usage: "<var>keywords</var>",
610 +                       example: "laptop reviews",
611 +                       description: "Search Yahoo!",
612 +                       url: "http://m.yahoo.com/w/search/oneSearch?p=",
613 +                       noArguments: {
614 +                               url: "http://m.yahoo.com/search"
615 +                       }
616 +               },
617 +               "y": "yahoo",
618 +
619 +               "gis": {
620 +                       title: "Google Images",
621 +                       usage: "<var>keywords</var>",
622 +                       example: "pirate hat",
623 +                       description: "Search Google Images",
624 +                       url: "http://www.google.com/m/search?client=ms-palm-webOS&channel=iss&site=images&q=",
625 +                       noArguments: {
626 +                               url: "http://images.google.com/m/"
627 +                       }
628 +               },
629 +               
630 +               "shop": {
631 +                       title: "Google Product Search",
632 +                       usage: "<var>keywords</var>",
633 +                       example: "palm pre",
634 +                       description: "Search Google Products",
635 +                       url: "http://www.google.com/m/search?client=ms-palm-webOS&channel=iss&site=products&q=",
636 +                       noArguments: {
637 +                               url: "http://products.google.com/m/"
638 +                       }
639 +               },
640 +               "froogle": "shop",
641 +
642 +               "news": {
643 +                       title: "Google News Search",
644 +                       usage: "<var>keywords</var>",
645 +                       example: "obama",
646 +                       description: "Search Google News",
647 +                       url: "http://www.google.com/m/search?client=ms-palm-webOS&channel=iss&site=news&q=",
648 +                       noArguments: {
649 +                               url: "http://news.google.com/m/"
650 +                       }
651 +               },
652 +               
653 +               "google": {
654 +                       excludeFromUniversalSearchList: true,
655 +                       title: "Google",
656 +                       usage: "<var>keywords</var>",
657 +                       example: "hummus recipe",
658 +                       description: "Search Google",
659 +                       url: "www.google.com/m/search?client=ms-palm-webOS&channel=iss&q=",
660 +                       noArguments: {
661 +                               url: "http://www.google.com/m/"
662 +                       }
663 +               },
664 +               "g": "google",
665 +
666 +               "amazon": {
667 +                       title: "Amazon",
668 +                       usage: "<var>keywords</var>",
669 +                       example: "i am america and so can you",
670 +                       description: "Search for products on Amazon.com",
671 +                       url: "http://www.amazon.com/gp/aw/s/ref=is_box_?k=",
672 +                       noArguments: {
673 +                               url: "http://www.amazon.com/gp/aw"
674 +                       }
675 +               },
676 +               "az": "amazon",
677 +
678 +               "wikipedia": {
679 +                       excludeFromUniversalSearchList: true,
680 +                       title: "Wikipedia",
681 +                       usage: "<var>keywords</var>",
682 +                       example: "isaac newton",
683 +                       description: "Search Wikipedia",
684 +                       url: "http://en.m.wikipedia.org/wiki/Special:Search?search=",
685 +                       noArguments: {
686 +                               url: "http://en.m.wikipedia.org/"
687 +                       }
688 +               },
689 +               "wiki": "wikipedia",
690 +               "w": "wikipedia",
691 +
692 +               "note": {
693 +                       title: "New Note",
694 +                       usage: "<var>text</var>",
695 +                       example: "I like pie.",
696 +                       description: "Quickly create a new note.",
697 +                       appId: "com.palm.app.notes",
698 +                       param: "newNoteText",
699 +                       noArguments: {
700 +                               appId: "com.palm.app.notes"
701 +                       }
702 +               },
703 +               "memo": "note",
704 +               "m": "note",
705 +               "n": "note",
706 +
707 +               "restart": {
708 +                       excludeFromUniversalSearchList: true,
709 +                       title: "Restart Luna",
710 +                       usage: "<b>luna</b>",
711 +                       description: "Restarts Luna.",
712 +                       takesMultipleArguments: true,
713 +                       method: function (args) {
714 +                               if (args.length >= 1 && args[0] === "luna") {
715 +                                       try {
716 +                                               var r = new Mojo.Service.Request(
717 +                                                       'luna://org.webosinternals.ipkgservice',
718 +                                                       { method: 'restartluna' }
719 +                                               );
720 +                                       }
721 +                                       catch (e) {
722 +                                               throw new CommandLineError('Error Restarting Luna: ' + e.message);
723 +                                       }
724 +                               }
725 +                       }
726 +               },
727 +
728 +               "show": {
729 +                       excludeFromUniversalSearchList: true,
730 +                       argumentsOptional: true,
731 +                       title: "Show Additional Searches",
732 +                       description: "Shows additional searches on the Universal Search screen.",
733 +                       method: function () {
734 +                               this.setShow(true);
735 +                               return {
736 +                                       title: "Show Additional Searches",
737 +                                       message: "Additional searches will now appear in Universal Search."
738 +                               };
739 +                       }
740 +               },
741 +
742 +               "hide": {
743 +                       excludeFromUniversalSearchList: true,
744 +                       argumentsOptional: true,
745 +                       title: "Hide Additional Searches",
746 +                       description: "Hides additional searches from the Universal Search screen.",
747 +                       method: function () {
748 +                               this.setShow(false);
749 +                               return {
750 +                                       title: "Hide Additional Searches",
751 +                                       message: "Additional searches will no longer appear in Universal Search."
752 +                               };
753 +                       }
754 +               },
755 +
756 +               "help": {
757 +                       excludeFromUniversalSearchList: true,
758 +                       title: "Help",
759 +                       excludeFromHelp: true,
760 +                       argumentsOptional: true,
761 +                       method: function () {
762 +                               var that = this;
763 +                               var sc = Mojo.Controller.appController.getStageController("uscl-help");
764 +                               if (sc) {
765 +                                       var scenes = sc.getScenes();
766 +                                       if (!(scenes && scenes.length === 1)) {
767 +                                               // doing this if the top scene
768 +                                               // is already 'grid' causes an
769 +                                               // unwanted transition effect.
770 +                                               sc.popScenesTo("uscl-help-command-list");
771 +                                       }
772 +                                       sc.activate();
773 +                               }
774 +                               else {
775 +                                       var stageArguments = {
776 +                                               name: "uscl-help",
777 +                                               lightweight: true
778 +                                       };
779 +                                       var pushScene = function (sc) {
780 +                                               sc.pushScene("uscl-help-command-list", that);
781 +                                       };
782 +                                       Mojo.Controller.appController.createStageWithCallback(
783 +                                               stageArguments, pushScene, "card");
784 +                               }
785 +                       }
786 +               }
787 +       },
788 +
789 +       run: function (command, arg) {
790 +               if (!this.entries) {
791 +                       return;
792 +               }
793 +               var entry;
794 +               if (command instanceof Object) {
795 +                       entry = command;
796 +               }
797 +               else {
798 +                       entry = this.entries[command];
799 +                       if (!entry) {
800 +                               throw new CommandLineError("." + command + ": Command not found.");
801 +                       }
802 +                       while (entry.constructor === String) { // handle aliases
803 +                               entry = this.entries[entry];
804 +                       }
805 +                       if (!entry) {
806 +                               throw new CommandLineError("." + command + ": Command not found.");
807 +                       }
808 +               }
809 +               if (!/\S/.test(arg) && !entry.argumentsOptional) {
810 +                       throw new CommandLineError("." + command + ": No arguments specified.");
811 +               }
812 +               if (entry.method) {
813 +                       var args = [arg];
814 +                       if (entry.takesMultipleArguments) {
815 +                               arg = arg.replace(/^\s+/, "");
816 +                               arg = arg.replace(/\s+$/, "");
817 +                               args = [arg.split(" ")];
818 +                       }
819 +                       var result = entry.method.apply(this, args);
820 +                       return result;
821 +               }
822 +               else if (entry.appId) {
823 +                       if (this.commandLineApps && 
824 +                           !this.commandLineApps[entry.appId + "_default"]) {
825 +                               throw new CommandLineError("." + command + ": The application " + entry.appId +
826 +                                                          " is not configured for the Universal Search Command Line.");
827 +                       }
828 +                       var params = {};
829 +                       params[entry.param] = arg;
830 +                       // returns a function, which will be called with this
831 +                       // set to the global search assistant object.
832 +                       return function () {
833 +                               this.controller.serviceRequest(
834 +                                       "palm://com.palm.applicationManager", {
835 +                                               method: "launch",
836 +                                               parameters: {
837 +                                                       id: entry.appId,
838 +                                                       params: params
839 +                                               }
840 +                                       }
841 +                               );
842 +                       };
843 +               }
844 +               else if (entry.url) {
845 +                       // returns a function, which will be called with this
846 +                       // set to the global search assistant object.
847 +                       return function () {
848 +                               this.launchBrowser(entry.url + encodeURIComponent(arg.trim()));
849 +                       };
850 +               }
851 +               else {
852 +                       throw new CommandLineError("." + command + ": Command not implemented.");
853 +               }
854 +       },
855 +
856 +       build: function (options) {
857 +               var command;
858 +               var entry;
859 +               var realName;
860 +               this.aliases = {};
861 +               this.realCommandList = [];
862 +               for (command in this.entries) {
863 +                       if (!this.entries.hasOwnProperty(command)) {
864 +                               continue;
865 +                       }
866 +                       entry = this.entries[command];
867 +                       if (entry.constructor === String) {
868 +                               while (entry && entry.constructor === String) {
869 +                                       realName = entry;
870 +                                       entry = this.entries[entry];
871 +                               }
872 +                               this.aliases[command] = entry;
873 +                               if (!entry.aka) {
874 +                                       entry.aka = [];
875 +                               }
876 +                               entry.aka.push(command);
877 +                       }
878 +                       else {
879 +                               entry.commandName = command;
880 +                               this.realCommandList.push(entry);
881 +                       }
882 +               }
883 +               this.realCommandList.forEach(function (entry) {
884 +                       if ("aka" in entry) {
885 +                               entry.aka.sort();
886 +                       }
887 +                       if ("usage" in entry) {
888 +                               entry.usageHTML = "." + entry.commandName + " " + entry.usage;
889 +                       }
890 +                       else {
891 +                               entry.usageHTML = "." + entry.commandName;
892 +                       }
893 +                       if (entry.aka && entry.aka.length) {
894 +                               entry.usageHTML =
895 +                                       ("<span class='aliases'>" +
896 +                                        entry.aka.map(function (s) { return "<span class='alias'>." + s + "</span>|"; }).join("") +
897 +                                        "</span>" + entry.usageHTML);
898 +                       }
899 +                       if ("example" in entry) {
900 +                               entry.exampleHTML = "." + entry.commandName + " " + entry.example;
901 +                       }
902 +                       else {
903 +                               entry.exampleHTML = null;
904 +                       }
905 +                       if ("title" in entry) {
906 +                               entry.titleSort = entry.title.toLowerCase();
907 +                       }
908 +               });
909 +               this.buildHelpCommandList();
910 +               this.buildUniversalSearchList();
911 +               this.buildSupportingAppList();
912 +       },
913 +
914 +       buildHelpCommandList: function () {
915 +               this.helpCommandList = this.realCommandList.filter(function (a) {
916 +                       return !a.excludeFromHelp;
917 +               });
918 +               this.helpCommandList.sort(function (a, b) {
919 +                       return ((a.titleSort < b.titleSort) ? -1 : 
920 +                               (a.titleSort > b.titleSort) ? 1 : 0);
921 +               });
922 +       },
923 +
924 +       buildUniversalSearchList: function () {
925 +               this.universalSearchList = this.realCommandList.filter(function (a) {
926 +                       return !a.excludeFromUniversalSearchList;
927 +               });
928 +               this.universalSearchList.sort(function (a, b) {
929 +                       return ((a.titleSort < b.titleSort) ? -1 : 
930 +                               (a.titleSort > b.titleSort) ? 1 : 0);
931 +               });
932 +       },
933 +
934 +       buildSupportingAppList: function () {
935 +               // Hopefully this won't take forever.
936 +               this.commandLineListRequest = 
937 +                       new Mojo.Service.Request("palm://com.palm.applicationManager", {
938 +                               method: 'searchApps',
939 +                               parameters: {'keyword': 'igrokthecommandline'},
940 +                               onSuccess: this.handleSupportingAppResults.bind(this),
941 +                               onFailure: this.handleSupportingAppResults.bind(this)
942 +                       });
943 +       },
944 +       
945 +       handleSupportingAppResults: function (response) {
946 +               var that = this;
947 +               var apps = response.apps;
948 +               if (!apps) {
949 +                       return;
950 +               }
951 +               this.commandLineApps = {};
952 +               apps.forEach(function (app) {
953 +                       var launchPoint = app.launchPoint;
954 +                       that.commandLineApps[launchPoint] = true;
955 +               });
956 +       },
957 +       
958 +       runString: function (s) {
959 +               if (!/^\s*\.(\S+)\s*(.*)$/.test(s)) {
960 +                       throw new CommandLineError("No command supplied.");
961 +               }
962 +               var command = RegExp.$1;
963 +               var arg     = RegExp.$2;
964 +               return this.run(command, arg);
965 +       },
966 +       
967 +       isCommandLineString: function (s) {
968 +               return (/^\s*\./).test(s);
969 +       }
970 +});
971 +
972 Index: /usr/lib/luna/system/luna-applauncher/app/views/global-search/expanded-searches-div.html
973 ===================================================================
974 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/global-search/expanded-searches-div.html
975 +++ /usr/lib/luna/system/luna-applauncher/app/views/global-search/expanded-searches-div.html
976 @@ -17,4 +17,14 @@
977                         </div>
978                 </div> 
979         </div>  
980 +       <div id='command_line_drawer' x-mojo-element="Drawer">
981 +               <div class="palm-row last" id="commandLine" name="search-identifier" x-mojo-tap-highlight="persistent">
982 +                       <div class="palm-row-wrapper">
983 +                               <div class="title search-command-line truncating-text">
984 +                                       <span class="prefix">cmd:</span>
985 +                                       <kbd id="commandlinetext">#{filterText}</kbd>
986 +                               </div>
987 +                       </div>
988 +               </div> 
989 +       </div>
990  </div>
991 Index: /usr/lib/luna/system/luna-applauncher/app/views/global-search/expanded-searches-div-uscl.html
992 ===================================================================
993 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/global-search/expanded-searches-div-uscl.html
994 +++ /usr/lib/luna/system/luna-applauncher/app/views/global-search/expanded-searches-div-uscl.html
995 @@ -0,0 +1,3 @@
996 +<div id='expanded_searches_drawer_uscl' x-mojo-element="Drawer">
997 +       <div id="usclSearches" class="palm-list" x-mojo-element="List"></div>
998 +</div>
999 Index: /usr/lib/luna/system/luna-applauncher/app/views/global-search/templates/uscl-searches-item.html
1000 ===================================================================
1001 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/global-search/templates/uscl-searches-item.html
1002 +++ /usr/lib/luna/system/luna-applauncher/app/views/global-search/templates/uscl-searches-item.html
1003 @@ -0,0 +1,5 @@
1004 +<div class="palm-row" name="search-identifier" x-mojo-tap-highlight="momentary">
1005 +       <div class="palm-row-wrapper">
1006 +               <div class="search-uscl">#{title}</div>
1007 +       </div>
1008 +</div>
1009 Index: /usr/lib/luna/system/luna-applauncher/app/views/global-search/templates/uscl-searches-list.html
1010 ===================================================================
1011 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/global-search/templates/uscl-searches-list.html
1012 +++ /usr/lib/luna/system/luna-applauncher/app/views/global-search/templates/uscl-searches-list.html
1013 @@ -0,0 +1,3 @@
1014 +<div class="palm-list">
1015 +       #{-listElements}
1016 +</div>
1017 Index: /usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
1018 ===================================================================
1019 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
1020 +++ /usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
1021 @@ -10,6 +10,10 @@
1022                 
1023                 <div class="palm-group solid" id="launcherIconsDiv"></div>
1024                 
1025 +               <div class="palm-group unlabeled search" id="searchesDivUSCL">
1026 +                       <div class="palm-list" id="searches-list-uscl"></div>
1027 +               </div>
1028 +               
1029                 <div id="contactsDiv"></div>
1030                 
1031                 <div class="palm-group search" id="singleContactsDiv"></div>
1032 Index: /usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/templates/item.html
1033 ===================================================================
1034 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/templates/item.html
1035 +++ /usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/templates/item.html
1036 @@ -0,0 +1,6 @@
1037 +<div class="palm-row" x-mojo-tap-highlight="momentary">
1038 +       <div class="palm-row-wrapper">
1039 +               <div class="uscl-help-command-name"  id="command-name"><kbd>.#{commandName}</kbd></div>
1040 +               <div class="uscl-help-command-title" id="title"       >#{title}</div>
1041 +       </div>
1042 +</div>
1043 Index: /usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/templates/list.html
1044 ===================================================================
1045 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/templates/list.html
1046 +++ /usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/templates/list.html
1047 @@ -0,0 +1,3 @@
1048 +<div class="palm-list">
1049 +       #{-listElements}
1050 +</div>
1051 Index: /usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/uscl-help-command-list-scene.html
1052 ===================================================================
1053 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/uscl-help-command-list-scene.html
1054 +++ /usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-list/uscl-help-command-list-scene.html
1055 @@ -0,0 +1,11 @@
1056 +<div id="uscl-help-command-list" class="uscl-help uscl-help-command-list">
1057 +       <div class="palm-page-header multi-line">
1058 +               <div class="palm-page-header-wrapper">
1059 +                       <div class="title left">
1060 +                               Universal Search Command Line Help
1061 +                       </div>
1062 +               </div>
1063 +       </div>
1064 +       <div id="command-list" x-mojo-element="List">
1065 +       </div>
1066 +</div>
1067 Index: /usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-view/uscl-help-command-view-scene.html
1068 ===================================================================
1069 --- .orig/usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-view/uscl-help-command-view-scene.html
1070 +++ /usr/lib/luna/system/luna-applauncher/app/views/uscl-help-command-view/uscl-help-command-view-scene.html
1071 @@ -0,0 +1,13 @@
1072 +<div id="uscl-help-command-view" class="uscl-help uscl-help-command-view">
1073 +       <div class="palm-page-header multi-line">
1074 +               <div class="palm-page-header-wrapper">
1075 +                       <div class="title left" id="title">
1076 +                       </div>
1077 +               </div>
1078 +       </div>
1079 +       <div class="contents">
1080 +               <div class="uscl-help-usage">Usage: <kbd class="usage" id="usage"></kbd></div>
1081 +               <div class="uscl-help-description" id="description"></div>
1082 +               <div class="uscl-help-example" id="exampleDiv">Example: <kbd class="example" id="example"></kbd></div>
1083 +       </div>
1084 +</div>
1085 Index: /usr/lib/luna/system/luna-applauncher/index.html
1086 ===================================================================
1087 --- .orig/usr/lib/luna/system/luna-applauncher/index.html
1088 +++ /usr/lib/luna/system/luna-applauncher/index.html
1089 @@ -9,6 +9,7 @@
1090         
1091         <link href="stylesheets/launcher.css" media="screen" rel="stylesheet" type="text/css" title="standard" />
1092         <link href="stylesheets/global-search.css" media="screen" rel="stylesheet" type="text/css" title="standard" />
1093 +       <link href="stylesheets/uscl-help.css" media="screen" rel="stylesheet" type="text/css" title="standard" />
1094  </head>
1095  <body>
1096  </body>
1097 Index: /usr/lib/luna/system/luna-applauncher/sources.json
1098 ===================================================================
1099 --- .orig/usr/lib/luna/system/luna-applauncher/sources.json
1100 +++ /usr/lib/luna/system/luna-applauncher/sources.json
1101 @@ -13,6 +13,20 @@
1102         },
1103         
1104         {
1105 +               "source": "app\/controllers\/uscl.js"
1106 +       },
1107 +       
1108 +       {
1109 +               "source": "app\/controllers\/uscl-help-command-list.js",
1110 +               "scenes": "uscl-help-command-list"
1111 +       },
1112 +       
1113 +       {
1114 +               "source": "app\/controllers\/uscl-help-command-view.js",
1115 +               "scenes": "uscl-help-command-view"
1116 +       },
1117 +       
1118 +       {
1119                 "source": "app\/controllers\/app-info-assistant.js"
1120         },
1121  
1122 Index: /usr/lib/luna/system/luna-applauncher/stylesheets/global-search.css
1123 ===================================================================
1124 --- .orig/usr/lib/luna/system/luna-applauncher/stylesheets/global-search.css
1125 +++ /usr/lib/luna/system/luna-applauncher/stylesheets/global-search.css
1126 @@ -167,6 +167,19 @@
1127         text-align: center;
1128  }
1129      
1130 +.palm-group.search .search-command-line {
1131 +       text-align: left;
1132 +       font-size: smaller;
1133 +}
1134 +.palm-group.search .search-command-line .prefix {
1135 +       color: black;
1136 +       font-weight: bold;
1137 +}
1138 +.palm-group.search .search-uscl {
1139 +       text-align: center;
1140 +       padding-top: 10px;
1141 +}
1142 +    
1143  .palm-group.search .palm-group-title {
1144         max-width: 264px;                   
1145  }                       
1146 Index: /usr/lib/luna/system/luna-applauncher/stylesheets/uscl-help.css
1147 ===================================================================
1148 --- .orig/usr/lib/luna/system/luna-applauncher/stylesheets/uscl-help.css
1149 +++ /usr/lib/luna/system/luna-applauncher/stylesheets/uscl-help.css
1150 @@ -0,0 +1,41 @@
1151 +#uscl-help-command-list,
1152 +#uscl-help-command-view {
1153 +       color: white;
1154 +}
1155 +
1156 +kbd {
1157 +       font-weight: bold;
1158 +       color: yellow;
1159 +       font-family: inherit;
1160 +}
1161 +kbd .aliases {
1162 +       font-weight: normal;
1163 +       opacity: 0.5;
1164 +}
1165 +kbd var {
1166 +       font-weight: normal;
1167 +       font-style: italic;
1168 +}
1169 +
1170 +#uscl-help-command-list .palm-row-wrapper {
1171 +       padding: 10px 15px 0 15px;
1172 +}
1173 +#uscl-help-command-list .palm-row .uscl-help-command-title {
1174 +}
1175 +#uscl-help-command-list .palm-row .uscl-help-command-name {
1176 +       float: right;
1177 +       text-align: right;
1178 +}
1179 +
1180 +#uscl-help-command-view .contents {
1181 +       padding: 5px 15px;
1182 +}
1183 +#uscl-help-command-view .uscl-help-description {
1184 +       padding-top: .5em;
1185 +       font-size: smaller;
1186 +}
1187 +#uscl-help-command-view .uscl-help-example {
1188 +       padding-top: .5em;
1189 +       font-size: smaller;
1190 +}
1191 +