1 /** 2 * @class Monk.component.Help 3 * @description Handles Help messaging for the workbench. Encapsulates Ext.MessageBox class. 4 * @extends Workbench.lang.Object 5 * @author Carl Stahmer 6 */ 7 8 Monk.component.Help = function(args) { 9 Monk.component.Help.superclass.constructor.call(this, args); 10 11 } 12 13 Workbench.extend(Monk.component.Help, Workbench.lang.Object, { 14 15 label : "Help", 16 "window" : this.window, 17 18 //Simple help display controls help that is associate with UI components (such as Header titles and text) 19 //as opposed to the tools themselves, which have help data assosicated with them as a property. 20 simple : function(titleText, flag, target) { 21 target = target ? target : window; 22 var msgtxt = this.settext(flag); 23 return target.Ext.Msg.alert(titleText,msgtxt); 24 }, 25 26 //Displays help for tools. 27 //this functionality is coming shortly. 28 dynamic : function(titleText, helptext, target) { 29 target = target ? target : window; 30 return target.Ext.Msg.alert(titleText,helptext); 31 }, 32 33 //Displays help for tools. 34 //this functionality is coming shortly. 35 contextSensitive : function(titleText, helptext, target) { 36 target = target ? target : window; 37 //modify this code so that the system uses a call through data.js to 38 //get the contents of the URL sent in the helptext variable and then 39 //load put this content into the window 40 return target.Ext.Msg.alert(titleText,helptext); 41 //return target.Ext.Msg.alert(titleText,Monk.feature.flowManager.currentStep); 42 43 }, 44 45 //Define Help Text for simple help display here 46 settext : function(strFlag) { 47 helptext = "Sorry, no help text is associated with this item"; 48 49 if(/PROJECT_WORKSET_RESULTS/.test(strFlag)) { 50 helptext = '<p>The worksets and results pane is the main interface for creating '+ 51 'and tracking your work in MONK. From here you can apply analysis tools to a collection, '+ 52 'view and define text collections, and view the results of '+ 53 'your analysis.</p><p><b>New Projects:</b> If this is a new project, the only thing you will see '+ 54 'in this view is a set of available toolsets. To begin work, chose a toolset and Continue. '+ 55 'Dependign upon the toolset you have chosen, you will then be prompted with a screen '+ 56 'allowing you to define a workset, a collection of text parts on which you wish to perform '+ 57 'an analysis.</p><p><b>Returning Projects:</b> If you are returning to your project, or visiting somebody else\'s '+ 58 'project, you will see not only the Toolset Selection pane but also a list of previously '+ 59 'defined worksets and a list of previously generated results. You can review '+ 60 'previous results by selecting the results you wish to view from the results list and '+ 61 'clicking Continue. Alternatively, you can perform further analysis on any of your '+ 62 'previously defined worksets by selecting both a workset AND a toolset and clicking '+ 63 'Continue. New worksets can be created at any time by selecting a Toolset only and '+ 64 'clicking Continue.</P>'; 65 } else if(/PROJECT_TOOLSET_EDITOR/.test(strFlag)) { 66 helptext = '<p>The Toolset Editor allows you to build your own, customized toolsets for '+ 67 'analyzing data in MONK. Monk tools come in a variety of shapes, sizes, and functionalities. You '+ 68 'can build a toolset by modifying one of MONK\'s pre-defined toolsets or you can '+ 69 'start from scratch and create your own. To add a new tool to a toolset, simply '+ 70 'locate a tool in the tool list at the bottom of the page and drag its icon into '+ 71 'the toolset editor pane.</p>'+ 72 '<p>The order in which tools are arranged in the toolset affects the flow of your work '+ 73 'in Monk. Generally speaking, a toolset flow should include options for: 1) '+ 74 'selecting works and/or parts thereof; 2) rating works and work parts; 3) '+ 75 'defining analysis options; 4) performing analysis; and 5) retreiving and displaying '+ 76 'results. A Toolset canonizes specific workflows using tools of your choosing.</p>'+ 77 '<p><b>Modifying an Existing '+ 78 'Toolset:</b> To modify an existing toolset, select the toolset icon in the left '+ 79 'pane and the toolset will appear in the Toolset Editor pane. Once you have selected '+ 80 'a toolset to modify, drag and drop tools into the editor pane to modify the toolset.' 81 } else if(/PROJECTTOOLSETS_TOOLSETS/.test(strFlag)) { 82 helptext = '<p>A Toolset is an integrated set of tools for textual analysis. Default Toolsets '+ 83 'have been prepared by MONK for novice users as independent applications that can be used '+ 84 '\"as is.\" For a description of the functionality of each Default Toolset, place your '+ 85 'mouse over the icon for that toolset. While Default toolsets are pre-defined by MONK, '+ 86 'advanced users can add tools to a Default Toolset and save it as their own Project Toolset.</p>' 87 } else if(/WORKSETSELECTOR_PROJECT_WORKSETS/.test(strFlag)) { 88 helptext = '<p>Worksets organize a set of parts of interest of texts selected by a user to '+ 89 'conduct their work. Users can have multiple worksets which can be edited, emailed '+ 90 'etc. They represent the entire scope of interest from which 2 or more corpora might '+ 91 'be subsetted and compared.</p><p><b>Select a Workset and a Toolset then click Continue to begin.</b></p>' 92 } else if(/WORKSETSELECTOR_PROJECT_RESULTS/.test(strFlag)) { 93 helptext = '<p>Results are the output of applying the tools defined in a Toolset to the '+ 94 'parts defined by a Workset. If you have not previously applied a Toolset to a '+ 95 'Workset, then no Results will appear in the browser. In this case, you should begin '+ 96 'working by selecting a Toolset and clicking Continue to create a new Workset, or by '+ 97 'selecting a Toolset and Workset to work with an existing Workset.</p><p>To view a '+ 98 'previous analysis result, <b>select a Result from the list and click Continue.</b></p>' 99 } 100 101 return helptext; 102 } 103 104 }); 105 106 /** 107 * A static instance of the {@link Monk.component.Help} class. 108 */ 109 Monk.component.help = new Monk.component.Help(); 110 111 112