Changeset 472 for Dev


Ignore:
Timestamp:
07/01/13 03:34:23 (12 years ago)
Author:
hendrikvanantwerpen
Message:

Fixed deploy script.
Fix for ... in ... complaints by jshint.
Fix a typo.

Location:
Dev/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/deploy.sh

    r469 r472  
    44DEPLOYDIR=quod-erat.git
    55
    6 if [ -z $1 ]; then
    7     echo "Suage: $o <commit message>"
     6if [ -z "$1" ]; then
     7    echo "Usage: $o <commit message>"
    88    exit 1
    99fi
     
    1313fi
    1414
    15 (cd "$DEPLOYDIR" && rm -rf * && cp -r ../build/* . && git add . && git commit -a "$1")
     15(cd "$DEPLOYDIR" && git pull && rm -rf * && cp -r ../build/* . && git add . && git commit -a -m "$1" && git push)
  • Dev/trunk/docs/TODO.md

    r468 r472  
    22====
    33
    4  * Drop separate development directory for more complicated build process.
    5    - Generate files in-place (maybe even include in commit, although I hate that.)
    6      Automatically update gitignore for generated files?
    7    - Add header to files to make sure they are not edited as source files by accident.
    8    - A smarter copy might also fix this, maybe we should implement our own copy.
    9    - Can we do amd dependency checks?
    10    - We should also lint the generated javascript, because coffee
    11      doesn't catch accidental globals
    12  * Have a generic page-wide note (rounded corner, close button thingy)
    13    for notification (maybe completely replace the toaster?)
    14  * Response:
    15    - should we show response answers after submission?
    16    - idem after the run ended?
    17  * Questions
     4 * App / General
     5   - Introduce a page-wide note (rounded corner box at the top e.g.)
     6     for notifications that the user has to confirm.
     7   - Prevent pages from moving away if they contain unsaved edits.
     8   - Make sure no user generated content is directly inserted in the
     9     DOM tree (i.e. innerHTML or .content assignments)
     10
     11 * Response
     12   - response url stops working after response is submitted or surveyRun is closed
     13   - Check if this works on tablets as well.
     14   - Should we provide degraded options for filling in surveys for
     15     browsers that do not support JS? This would involve server-side
     16     rendering, old-school form submission and server-side validation.
     17
     18 * Question
    1819   - Question is always shown as 'no topic' when no category is added to it.
    19    - Fragile: widget creation relies on the names in Factory, but
    20      these must match the types returned by the actual widgets. Fix
    21      this.
    22    - Would be nicer if only newly dropped questions are in edit mode
    23      and the ones that exist on load in view mode.
    24  * Codes
    25    - Details need to be figured out. Now we have a code in one place,
    26      we add indices to disambiguate. Should we allow code editing all
    27      the way to the lowest detail? And should it be the complete code or
    28      just additions?
    29    - Check that question codes are unique in the database.
    30    - It might be good to show the codes in GUI, so they know at least
    31      which element will be called what
    32  * Validation
    33    - restore our json schema, there's probably several problems, it
    34      was disabled because the questions didn't pass anymore.
    35    - use it server side (and maybe client side as well?)
    36  * Editing
    37    - Warn if leaving a page that has edits.
    38  * Validate documents on the server before saving them.
    39  * Implement authentication and later authorization.
    40    - Can we hook in request API so stores work correctly?
    41  * Export answers for a survey run
    42    - Allow to include partial results, or just include submission date.
    43    - Include an URL to the dataset/run so it can easily be traced back.
    44    - Flatten object structure
    45  * Check if it works on tablets. We could consider special tablet UI
    46    later.
     20   - QuestionWidgetFactory relies on the names in the factory, but
     21     also on the name set in the widget. This is redundant and can
     22     cause inconsistencies. Remove the names from the widgets, only
     23     relying on the factory for the mapping.
     24   - Question codes are not checked for uniqueness.
     25   - Are question codes defined on the right level? Maybe they want
     26     control on a per-input basis. We can also provide an alias system
     27     for older data.
     28   - Users cannot see the code of a question easily. In survey view
     29     the code should be shown as well as the title.
     30   - When editing a question, the user should see the final codes the
     31     different inputs get, so they can match them more easily to their
     32     data.
     33   - Cannot easily find a question based on a code. This is important
     34     if a researcher wants to see the question related to one of his
     35     datasets in SPSS.
     36
     37 * Store
     38   - Data is not validated before being stored in the database, nor
     39     when it's used afterwards.
     40   - Data format should be designedso the database is mostly
     41     additive. It should also allow for adding metadata later
     42     (e.g. annotating questions with statistical information about the
     43     outcome).
     44
     45 * SurveyRun
     46   - Cannot export responses as CSV
     47   - Current response modes are unclear.
     48
    4749 * Sessions
    48    - modes: fixed, bulk, registration
    49    - off-line session:
    50      * provide a portal page where people can select available survey,
    51        maybe later see progress.
    52      * Allow for a registration round at the beginning (email, nick).
    53      * Show name clearly in portal, to prevent mistakes with the
    54        tablets.
    55      * Allow sessions based on subnet or a session code (A23X5Y).
    56      * Easy grouping of participants or selecting a subset for a
    57        survey.
    58      * On the server (localhost) show the ip(s) that people should
    59        connect to.
     50   - Allow ease of use for real-life sessions
     51     * allow registration by participants or pre-registration by GOD
     52     * provide a portal with simple access code so people don't have
     53       to type complicated URL's.
     54     * Make it easy to bookmark a session as a home icon on iP* or
     55       Android.
     56     * Clearly show a participant name/email in the screen to prevent
     57       errors because of mixing hardware. Maybe force confirmation
     58       after period of inactivity?
     59     * It should be easy for a host to start a survey or game to all
     60       or a subset of the participants. The UI could lead the
     61       participants in what they have to do next.
    6062
    61 Checklist
    62 =========
    63 
    64  * Form validation (use tooltips!)
    65  * Input validation & escaping
    66    - E.g. texts and labels of ScaleWidget are directly put in innerHTML, I don't think TextBox does any escaping.
    67  * Output escaping
    68  * Widget life-cycle
    69    buildRendering -> widgets in code before set attributes
    70    postCreate -> after all inits, but before in DOM
    71    startup -> after insertion in DOM?
    72  * Review current JSON formats, do they allow for extension or extra meta-data?
    73  
    74 Open issues
    75 ===========
    76 
    77  * Do different inputs in one question get different codes? E.g. in
    78    To ease exporting into other programs and easy communication, the codes
    79    are important I think. It should be easy to pronounce, and easy to
    80    find in the tool (people might get a dataset and not know where it
    81    came from).
    82  * What if a question is included in a survey multiple times. Use block
    83    or allow a pre/post-fix on the code to differentiate it.
    84    Should not be too much work, so if an scale with 5 items has 5 codes,
    85    you should be able to set a prefix on all of them at once.
     63 * Rethink build process
     64   - AMD dependency analysis/checking would be nice
  • Dev/trunk/src/client/qed-client/css/qed.css

    r452 r472  
     1/* This CSS file is generated. All edits will be lost on recompile. */
    12@import "dijit/claro.css";
    23/* line 1, /home/hendrik/gamelab/qed.svn/Dev/trunk/src/client/qed-client/css/colors.less */
  • Dev/trunk/src/client/qed-client/index.js

    r468 r472  
    11define([
    2     "./app/Content",
    3     "./app/Page",
    42    "./app/Router",
    53    "./routes",
    64    "./session",
    7     "./store",
    8     "./store/request",
    9     "./ui/LoginDialogWrapper",
    105    "./ui/MainMenu",
    116    "dojo/_base/array",
     
    138    "./stddeps",
    149    "dojo/domReady!"
    15 ], function(Content, Page, Router, routes, session, store,
    16             request, LoginDialogWrapper, MainMenu, array, parser) {
     10], function(Router, routes, session, MainMenu, array, parser) {
    1711
    1812    parser.parse();
  • Dev/trunk/src/client/qed-client/store/CouchStore.js

    r468 r472  
    241241
    242242            for ( var opt in queryOpts ) {
    243                 queryOpts[opt] = json.toJson(queryOpts[opt]);
     243                if ( queryOpts.hasOwnProperty(opt) ) {
     244                    queryOpts[opt] = json.toJson(queryOpts[opt]);
     245                }
    244246            }
    245247           
  • Dev/trunk/src/client/qed-client/widgets/LineWithActionsWidget.js

    r443 r472  
    3434            }
    3535            for (var action in this.actions) {
    36                 var properties;
    37                 if (this.actions[action].properties.blockButton === true) {
    38                     properties = lang.mixin({
    39                         baseClass: 'rftBlockButton',
    40                         label: "Default",
    41                         iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
    42                         title: this.actions[action].properties.tooltip,
    43                         onClick: lang.hitch(this, function(action, e){
    44                             if ( action.callback ) { action.callback(e); }
    45                             event.stop(e);
    46                             return false;
    47                         }, this.actions[action])
    48                     }, this.actions[action].properties);
    49                     new Button(properties).placeAt(this.buttonsNode);
    50                 } else {
    51                     properties = lang.mixin({
    52                         baseClass: 'rftInlineButton',
    53                         label: "Default",
    54                         showLabel: false,
    55                         iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
    56                         title: this.actions[action].properties.tooltip,
    57                         onClick: lang.hitch(this, function(action, e){
    58                             if ( action.callback ) { action.callback(e); }
    59                             event.stop(e);
    60                             return false;
    61                         }, this.actions[action])
    62                     }, this.actions[action].properties);
    63                     new Button(properties).placeAt(this.buttonsNode);
     36                if ( this.actions.hasOwnProperty(action) ) {
     37                    var properties;
     38                    if (this.actions[action].properties.blockButton === true) {
     39                        properties = lang.mixin({
     40                            baseClass: 'rftBlockButton',
     41                            label: "Default",
     42                            iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
     43                            title: this.actions[action].properties.tooltip,
     44                            onClick: lang.hitch(this, function(action, e){
     45                                if ( action.callback ) { action.callback(e); }
     46                                event.stop(e);
     47                                return false;
     48                            }, this.actions[action])
     49                        }, this.actions[action].properties);
     50                        new Button(properties).placeAt(this.buttonsNode);
     51                    } else {
     52                        properties = lang.mixin({
     53                            baseClass: 'rftInlineButton',
     54                            label: "Default",
     55                            showLabel: false,
     56                            iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
     57                            title: this.actions[action].properties.tooltip,
     58                            onClick: lang.hitch(this, function(action, e){
     59                                if ( action.callback ) { action.callback(e); }
     60                                event.stop(e);
     61                                return false;
     62                            }, this.actions[action])
     63                        }, this.actions[action].properties);
     64                        new Button(properties).placeAt(this.buttonsNode);
     65                    }
    6466                }
    6567            }
  • Dev/trunk/src/client/qed-client/widgets/ObjectBox.js

    r443 r472  
    4141            var line3Actions = {};
    4242            for (var action in this.actions) {
    43                 line3Actions[action] = {
    44                     callback: lang.hitch(this, function(callback){
    45                         if ( this.value ) { callback(this.value); }
    46                     }, this.actions[action]),
    47                     properties: {
    48                         blockButton: true,
    49                         label: action,
    50                         icon: action.charAt(0).toUpperCase()+action.slice(1)
    51                     }
    52                 };
     43                if ( this.actions.hasOwnProperty(action) ) {
     44                    line3Actions[action] = {
     45                        callback: lang.hitch(this, function(callback){
     46                            if ( this.value ) { callback(this.value); }
     47                        }, this.actions[action]),
     48                        properties: {
     49                            blockButton: true,
     50                            label: action,
     51                            icon: action.charAt(0).toUpperCase()+action.slice(1)
     52                        }
     53                    };
     54                }
    5355            }
    5456            return line3Actions;
  • Dev/trunk/src/client/qed-client/widgets/Selector.js

    r443 r472  
    5757            if ( this.selectedActions !== null ) {
    5858                for (var actionName in this.selectedActions) {
    59                     action = this.selectedActions[actionName];
    60                     actions[actionName] = {
    61                         callback: action.callback &&
    62                                 lang.hitch(this,this._onSelectedAction,
    63                                         action.callback),
    64                         properties: {
    65                             blockButton: true,
    66                             label: action.title || actionName,
    67                             icon: action.icon,
    68                             tooltip: action.description
    69                         }
    70 
    71                     };
     59                    if ( this.selectedActions.hasOwnProperty(actionName) ) {
     60                        action = this.selectedActions[actionName];
     61                        actions[actionName] = {
     62                            callback: action.callback &&
     63                                    lang.hitch(this,this._onSelectedAction,
     64                                            action.callback),
     65                            properties: {
     66                                blockButton: true,
     67                                label: action.title || actionName,
     68                                icon: action.icon,
     69                                tooltip: action.description
     70                            }
     71
     72                        };
     73                    }
    7274                }
    7375            }
     
    180182            if (this.itemActions) {
    181183                for (var actionName in this.itemActions) {
    182                     action = this.itemActions[actionName];
    183                     actions[actionName] = {
    184                         callback: action.callback && lang.partial(action.callback,item),
    185                         properties: {
    186                             blockButton: false,
    187                             showLabel: false,
    188                             icon: action.icon + " black",
    189                             tooltip: action.description
    190                         }
    191                     };
     184                    if ( this.itemActions.hasOwnProperty(actionName) ) {
     185                        action = this.itemActions[actionName];
     186                        actions[actionName] = {
     187                            callback: action.callback && lang.partial(action.callback,item),
     188                            properties: {
     189                                blockButton: false,
     190                                showLabel: false,
     191                                icon: action.icon + " black",
     192                                tooltip: action.description
     193                            }
     194                        };
     195                    }
    192196                }
    193197            }
  • Dev/trunk/src/client/qed-client/widgets/_ComplexValueMixin.coffee

    r466 r472  
    4646            # widgets within other forms, the onSubmit must either be
    4747            # ignored or propagated, but not handled here.
    48             event.stop if e
     48            event.stop e if e
    4949            false
Note: See TracChangeset for help on using the changeset viewer.