Commit c4d81d86 authored by Andreas Gärtner's avatar Andreas Gärtner

Added custom mask to enable swipe on masked

carousel items. Added function disableQuestion
to view.Question and view.FreetextQuestion in
order to enable this  behaviour.
parent 4cad4851
......@@ -9,3 +9,4 @@ src/main/webapp/lib/sencha1.1.1/arsnovaCombined.js
src/main/webapp/lib/sencha1.1.1/arsnovaCombined-debug.js
src/main/webapp/lib/sencha1.1.1/pkgs/arsnovaCombined.js
src/main/webapp/resources/css/arsnova_min.css
/target
......@@ -21,8 +21,7 @@
Ext.application({
requires: ['ARSnova.proxy.RestProxy',
'ARSnova.view.Question'],
requires: ['ARSnova.proxy.RestProxy'],
name: "ARSnova",
/* const */
......@@ -56,7 +55,7 @@ Ext.application({
/* app/view */
['Caption', 'CheckFullscreenPanel', 'LoginPanel', 'MainTabPanel', 'TabPanel', 'RolePanel', 'MathJaxField'],
['MathJaxMessageBox', 'MultiBadgeButton', 'NumericKeypad', 'FreetextAnswerPanel', 'FreetextDetailAnswer'],
['FreetextQuestion', 'QuestionStatusButton', 'SessionStatusButton'],
['FreetextQuestion', 'Question', 'QuestionStatusButton', 'SessionStatusButton', 'CustomMask'],
/* app/view/about */
['about.AboutPanel', 'about.ARSinLessonPanel', 'about.ARSPanel', 'about.CreditsPanel', 'about.HelpCanteenPanel'],
......
/*--------------------------------------------------------------------------+
This file is part of ARSnova.
app/view/CustomMask.js
- Beschreibung: Angepasste Maske, um Scrolling innerhalb eines Carousel zu ermoeglichen
- Version: 1.0, 21/05/13
- Autor(en): Andreas Gaertner <andreas.gaertner@mni.thm.de>
+---------------------------------------------------------------------------+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
+---------------------------------------------------------------------------+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+--------------------------------------------------------------------------*/
Ext.define('ARSnova.view.CustomMask', {
extend: 'Ext.Component',
xtype: 'custom-mask',
config: {
baseCls: Ext.baseCSSPrefix + 'mask',
transparent: false,
top: 0,
left: 0,
right: 0,
bottom: 0
},
initialize: function() {
this.callSuper();
this.element.on('*', 'onEvent', this);
},
updateTransparent: function(newTransparent) {
this[newTransparent ? 'addCls' : 'removeCls'](this.getBaseCls() + '-transparent');
}
});
\ No newline at end of file
......@@ -91,7 +91,7 @@ Ext.define('ARSnova.view.FreetextQuestion', {
* Bugfix, because panel is normally disabled (isDisabled == true),
* but is not rendered as 'disabled'
*/
if(this.isDisabled()) this.setDisabled(true);
if(this.isDisabled()) this.disableQuestion();
});
},
......@@ -125,7 +125,7 @@ Ext.define('ARSnova.view.FreetextQuestion', {
localStorage.setItem('questionIds', Ext.encode(questionsArr));
self.decrementQuestionBadges();
self.disable();
self.disableQuestion();
var pnl = Ext.create('Ext.Panel', {
cls: 'notificationBox',
......@@ -190,9 +190,9 @@ Ext.define('ARSnova.view.FreetextQuestion', {
});
},
disableQuestion: function() {
disableQuestion: function() {
this.setDisabled(true);
//this.setMasked(true);
this.mask(Ext.create('ARSnova.view.CustomMask'));
},
decrementQuestionBadges: function() {
......
......@@ -95,7 +95,7 @@ Ext.define('ARSnova.view.Question', {
}
localStorage.setItem('questionIds', Ext.encode(questionsArr));
list.up("panel").setDisabled(true);
list.up("panel").disableQuestion();
var pnl = Ext.create('Ext.Panel', {
cls: 'notificationBox',
......@@ -197,13 +197,13 @@ Ext.define('ARSnova.view.Question', {
* Bugfix, because panel is normally disabled (isDisabled == true),
* but is not rendered as 'disabled'
*/
if(this.isDisabled()) this.setDisabled(true);
if(this.isDisabled()) this.disableQuestion();
});
},
disableQuestion: function() {
disableQuestion: function() {
this.setDisabled(true);
//this.setMasked(true);
this.mask(new ARSnova.view.CustomMask);
},
decrementQuestionBadges: function() {
......
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