Commit 8517aeed authored by Sebastian Felsing's avatar Sebastian Felsing

added start and end date+layouting

parent d5e2eae6
......@@ -27,6 +27,12 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
sessionKey: null,
/* items */
sessionIdField: null,
unavailableSessionIds: [],
mycourses: [],
mycoursesStore: null,
/* toolbar items */
toolbar: null,
backButton: null,
......@@ -36,16 +42,18 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
subject: null,
textarea: null,
saveAndContinueButton: null,
startTimeDatePicker: null,
endTimeDatePicker: null,
constructor: function (args) {
this.callParent(arguments);
this.backButton = Ext.create('Ext.Button', {
text: Messages.BACK,
text: Messages.SESSIONS,
ui: 'back',
handler: function () {
var hTP = ARSnova.app.mainTabPanel.tabPanel.homeTabPanel;
hTP.animateActiveItem(hTP.motdPanel, {
hTP.animateActiveItem(hTP.mySessionsPanel, {
type: 'slide',
direction: 'right',
duration: 700
......@@ -64,7 +72,7 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
});
this.markdownEditPanel = Ext.create('ARSnova.view.MarkDownEditorPanel', {
processElement: this.textarea
processElement: this.answerText //text
});
this.subject = Ext.create('Ext.field.Text', {
......@@ -77,18 +85,18 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
placeHolder: Messages.FORMAT_PLACEHOLDER
});
this.mainPart = Ext.create('Ext.form.FormPanel', {
cls: 'newQuestion',
scrollable: null,
this.startTimeDatePicker = Ext.create('Ext.field.DatePicker', {
name: 'startTimeDatePicker',
label: 'Message Startdate',
value: new Date(),
});
this.endTimeDatePicker = Ext.create('Ext.field.DatePicker', {
name: 'endTimeDatePicker',
label: 'Message Enddate',
value: new Date(),
});
items: [{
xtype: 'fieldset',
items: [this.subject]
}, {
xtype: 'fieldset',
items: [this.markdownEditPanel, this.textarea]
}]
});
this.saveAndContinueButton = Ext.create('Ext.Button', {
ui: 'confirm',
......@@ -96,9 +104,11 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
text: Messages.SAVE_NEW_MESSAGE,
style: 'margin-top: 70px',
handler: function (button) {
this.saveHandler(button);//.then(function () {
//Ext.toast(Messages.QUESTION_SAVED, 3000);
//});
/*me.saveHandler(button).then(function () {
Ext.toast(Messages.QUESTION_SAVED, 3000);
}).then(Ext.bind(function (response) {
me.getScrollable().getScroller().scrollTo(0, 0, true);
}, me));*/
},
scope: this
});
......@@ -113,20 +123,26 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
id: 'createMessage',
submitOnAction: false,
items: [
this.mainPart,
this.saveAndContinueButton
]
items: [{
xtype: 'fieldset',
items: [{
xtype: 'fieldset',
items: [this.subject]
}, {
xtype: 'fieldset',
items: [this.markdownEditPanel, this.textarea]
}, {
xtype: 'fieldset',
items: [this.startTimeDatePicker]
}, {
xtype: 'fieldset',
items: [this.endTimeDatePicker]
}]
},this.saveAndContinueButton] //this.submitButton, this.coursesFieldset]
}]);
},
saveHandler: function (button) {
var mainPartValues = this.mainPart.getValues();
var values = null;
//values.text = mainPartValues.text;
//values.subject = mainPartValues.subject;
console.log("save button clicked :", mainPartValues);
}
});
......@@ -224,8 +224,6 @@ code {
color: #fff;
}
.x-label-align-right {
-webkit-box-direction: reverse!important;
-ms-flex-direction: row-reverse!important;
......@@ -269,6 +267,28 @@ html,body {
background-color: white;
}
.x-picker, .x-picker-item, .x-dataview-item, .x-dataview-container, .x-dock-body{
background: rgba(224, 224, 224, 1);
color: rgba(74, 92, 102, 1);
}
.x-picker-bar{
background: rgba(128, 186, 36, 0.6);
}
.x-container, .x-toolbar-dark, .x-toolbar, .x-paint-monitored, .x-navigation-bar, .x-dock-item, .x-docked-top{
color: rgba(74, 92, 102, 1);
}
.x-layout-box-item .x-stretched{
background: rgba(255, 255, 255, 1);
color: rgba(0, 0, 0, 1);
}
.x-toolbar{
background : rgba(74, 92, 102, 0.3);
}
.arsnova-logo {
background-repeat: no-repeat;
width: 288px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment