Ignore:
Timestamp:
07/05/12 12:49:21 (13 years ago)
Author:
hendrikvanantwerpen
Message:

Added DB code to sessions page.
Removed old static mockups.
Removed dup widgets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/pages/sessions.html

    r350 r353  
    11<div data-dojo-type="rft.pages.sessions">
    2     <script>
    3         function createNew(){
    4             var newBox = new rft.ui.ObjectBox({
    5                 title: 'TeamUp Basic Template',
    6                 subTitle: '',
    7                 lowerTitle: '',
    8                 objectType: 'SessionTemplate',
    9                 actions: {
    10                     "edit": function() {},
    11                     "delete": function() {}
    12                 }
    13             });
    14             newBox.startup();
    15             newBox.placeAt("containerTemplates", "last");
    16         }
    17        
    18         function createInstance(args) {
    19             // Create a template instance in the "Sessions" tab
    20             var args;
    21             args.objectType = "Session";
    22             var d = new Date();
    23             var dateString = d.getDate()+"-"+d.getMonth()+"-"+d.getFullYear();
    24             var creator = "Igor Mayer"; // Use currently logged in profile instead!
    25             args.subTitle = "Created on "+dateString+" by "+creator;
    26        
    27             args.actions = {
    28                 "edit": function() {},
    29                 "delete": function() {}
    30             }
    31             var newBox = new rft.ui.ObjectBox(args);
    32             newBox.startup();
    33             newBox.placeAt("containerSessions", "last");
    34 
    35             // TODO: Then switch tabs to the Sessions tab!
    36             var sess = dijit.byId("dijit_layout_ContentPane_5");
    37             dijit.byId("tabs").selectChild(sess);
    38         }
    39     </script>
    402    <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'center'" style="height: 500px;">
    413        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
     
    4810            <div data-dojo-type="dijit.layout.TabContainer" class="green" data-dojo-props="tabPosition:'left-h',region:'center'" id="tabs">
    4911                <div data-dojo-type="dijit.layout.BorderContainer" title="Templates">
    50                     <div id="containerTemplates" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'">
    51                         <!--TODO: These don't allow for custom icon settings yet! -->
    52                         <div data-dojo-type="rft.ui.ObjectBox" data-dojo-props="actions: {'edit': function(){alert('Custom edit code');}, 'delete':function(){}, 'Custom function': function(){alert('newCommand');}, 'publish': function(){alert('createInstance');}}"></div>
     12                    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'" data-rft-attach-point="containerTemplates">
    5313                    </div>
    5414                    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
    55                         <div data-dojo-type="dijit.form.Button" data-dojo-props="region: 'bottom', baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconSessionTemplate', onClick: function(){alert('createNew');}">Create new template</div>
     15                        <div data-dojo-type="dijit.form.Button" data-dojo-props="region: 'bottom', baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconSessionTemplate'" data-rft-attach-event="onClick:onAddSessionTemplate">Create new template</div>
    5616                    </div>
    5717                </div>
    5818                <div data-dojo-type="dijit.layout.ContentPane" title="Sessions">
    59                     <div id="containerSessions" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'">
    60 
     19                    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'" data-rft-attach-point="containerSessions">
    6120                    </div>
    6221                    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
Note: See TracChangeset for help on using the changeset viewer.