Commit 4d70e716 authored by Thomas Flemmer's avatar Thomas Flemmer

add All Messages panel

parent cd7fc394
......@@ -94,7 +94,7 @@
/* MESSAGE OF THE DAY */
MESSAGEOFTHEDAY: "Message of the Day",
MESSAGEOFTHEDAY_BUTTON: "MotD_DE",
MESSAGEOFTHEDAY_BUTTON: "MotD",
CREATE_NEW_MOTD: "Neue Message anlegen",
MY_MESSAGES: "Alle Nachrichten:",
NEW_MOTD: "Neue Message",
......@@ -669,7 +669,7 @@
/* MESSAGE OF THE DAY */
MESSAGEOFTHEDAY: "Message of the Day",
MESSAGEOFTHEDAY_BUTTON: "MotD_EN",
MESSAGEOFTHEDAY_BUTTON: "MotD",
CREATE_NEW_MOTD: "Create New Message",
MY_MESSAGES: "All Messages:",
NEW_MOTD: "New Message",
......
......@@ -258,6 +258,8 @@ Ext.define('ARSnova.view.home.HomePanel', {
};
var p1 = this.loadVisitedSessions();
var p2 = this.loadMySessions();
console.log("p2-session: ", p2);
// get the summary of all session lists
RSVP.all([p1, p2]).then(handler, function error() {
// errors swallow results, retest each promise seperately to figure out if one succeeded
......@@ -366,6 +368,7 @@ Ext.define('ARSnova.view.home.HomePanel', {
ARSnova.app.sessionModel.getMySessions({
success: function (response) {
var sessions = Ext.decode(response.responseText);
//console.log("response: ", response.responseText);
me.displaySessions(sessions, me.mySessionsForm, hideLoadingMask);
me.resizeSessionButtons();
if (sessions.length > 0) {
......
This diff is collapsed.
......@@ -27,12 +27,6 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
sessionKey: null,
/* items */
sessionIdField: null,
unavailableSessionIds: [],
mycourses: [],
mycoursesStore: null,
/* toolbar items */
toolbar: null,
backButton: null,
......@@ -47,11 +41,11 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
this.callParent(arguments);
this.backButton = Ext.create('Ext.Button', {
text: Messages.SESSIONS,
text: Messages.BACK,
ui: 'back',
handler: function () {
var hTP = ARSnova.app.mainTabPanel.tabPanel.homeTabPanel;
hTP.animateActiveItem(hTP.mySessionsPanel, {
hTP.animateActiveItem(hTP.motdPanel, {
type: 'slide',
direction: 'right',
duration: 700
......@@ -83,17 +77,28 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
placeHolder: Messages.FORMAT_PLACEHOLDER
});
this.mainPart = Ext.create('Ext.form.FormPanel', {
cls: 'newQuestion',
scrollable: null,
items: [{
xtype: 'fieldset',
items: [this.subject]
}, {
xtype: 'fieldset',
items: [this.markdownEditPanel, this.textarea]
}]
});
this.saveAndContinueButton = Ext.create('Ext.Button', {
ui: 'confirm',
cls: 'saveQuestionButton',
text: Messages.SAVE_NEW_MESSAGE,
style: 'margin-top: 70px',
handler: function (button) {
/*me.saveHandler(button).then(function () {
Ext.toast(Messages.QUESTION_SAVED, 3000);
}).then(Ext.bind(function (response) {
me.getScrollable().getScroller().scrollTo(0, 0, true);
}, me));*/
this.saveHandler(button);//.then(function () {
//Ext.toast(Messages.QUESTION_SAVED, 3000);
//});
},
scope: this
});
......@@ -108,20 +113,20 @@ Ext.define('ARSnova.view.home.NewMotdPanel', {
id: 'createMessage',
submitOnAction: false,
items: [{
xtype: 'fieldset',
items: [{
xtype: 'fieldset',
items: [this.subject]
}, {
xtype: 'fieldset',
items: [this.markdownEditPanel, this.textarea]
}]
},this.saveAndContinueButton] //this.submitButton, this.coursesFieldset]
items: [
this.mainPart,
this.saveAndContinueButton
]
}]);
},
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);
}
});
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