Ignore:
Timestamp:
02/20/12 16:27:19 (13 years ago)
Author:
hendrikvanantwerpen
Message:
  • [Client] Moved pages in subtree of rft/, allowing controllers next to them.
  • [Client] Created questions page, gives overview and allows adding.
  • [Client] Page controllers inherit from _Page, because the previous mechanism w

asn't working.

  • [Client] Added new user registration.
  • [Server] Changed user passwords to passwordHash/passwordSalt combination.
  • [Server] Added simple object marshalling and unmarshalling to preserve types.
  • [Server] Added ResearchToolObjectInterface? with static create() method. Implemented for all model classes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/content.js

    r264 r274  
    9292                        return dfd.promise;
    9393                    }
     94                    currentPage = null;
    9495                }
    9596               
     
    99100               
    100101                // load html
    101                 var pageUrl = 'pages'+hri.path()+'.html';
     102                var pageUrl = 'rft/pages'+hri.path()+'.html';
    102103                xhr.get({
    103104                    url: pageUrl,
     
    107108                // initialize page or create error message
    108109                .then(function(html){
    109                     currentPage = new _Page({
    110                         templateString: html,
    111                         pageQuery: hri.args()
    112                     });
    113                     contentPane.set('content',currentPage);
     110                    contentPane.set('content',html);
     111                    var rootNode = contentPane.containerNode.firstChild;
     112                    currentPage = dijit.byNode(rootNode);
     113                    if ( !currentPage ) {
     114                        currentPage = new _Page({},rootNode);
     115                    }
    114116                    dfd.resolve();
    115117                },function(){
    116                     currentPage = new _Page({
    117                         templateString: "<div>Page "+hri.path()+" not found.</div>"
    118                     });
    119                     contentPane.set('content',currentPage);
     118                    contentPane.set('content',"<div>Page "+hri.path()+" not found.</div>");
    120119                    dfd.reject();
    121120                });
Note: See TracChangeset for help on using the changeset viewer.