Changeset 353 for Dev/branches/rest-dojo-ui/client/rft/pages/sessions.html
- Timestamp:
- 07/05/12 12:49:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/pages/sessions.html
r350 r353 1 1 <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" tab20 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>40 2 <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'center'" style="height: 500px;"> 41 3 <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'"> … … 48 10 <div data-dojo-type="dijit.layout.TabContainer" class="green" data-dojo-props="tabPosition:'left-h',region:'center'" id="tabs"> 49 11 <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"> 53 13 </div> 54 14 <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> 56 16 </div> 57 17 </div> 58 18 <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"> 61 20 </div> 62 21 <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.