Permalink
Browse files

Change save buttons style and position

Signed-off-by: Alessandro Tundo <alessandrotundo94@gmail.com>
  • Loading branch information...
aletundo committed Sep 7, 2016
1 parent 98e1e49 commit 6e11bf608881505db5aeefcbcc1b5fd227f27750
Showing with 47 additions and 34 deletions.
  1. +0 −1 CourseEditor.namespaces.php
  2. +4 −3 CourseEditor.php
  3. +35 −22 CourseEditorTemplates.php
  4. +4 −4 modules/courseEditor.js
  5. +4 −4 modules/sectionEditor.js
@@ -1,7 +1,6 @@
<?php
$namespaceNames = array();
// For wikis without Gadgets installed.
if ( !defined( 'NS_COURSE' ) ) {
define( 'NS_COURSE', 2800 );
define ( 'NS_COURSE_TALK', 2801 );
View
@@ -3,11 +3,12 @@
if (!defined('MEDIAWIKI')){
die();
}
if(function_exists('wfLoadExtension')) {
wfLoadExtension('CourseEditor');
wfWarn( "Deprecated entry point to CourseEditor. Please use wfLoadExtension('CourseEditor').");
$wgMessagesDirs['CourseEditor'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['CourseEditorAlias'] = __DIR__ . '/CourseEditor.alias.php';
return;
}
else
{
View
@@ -18,21 +18,28 @@ public function execute() {
?>
<p><?php echo wfMessage( 'courseeditor-organize-chapters' ); ?></p>
<h2 id="sectionName"><?php echo htmlspecialchars($section) ?></h2>
<div class="col-md-8">
<div id="chaptersList"></div>
<div id="saveDiv"></div>
</div>
<div class="col-md-4">
<div id="undoStack">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading"><i class="fa fa-recycle" aria-hidden="true"></i>&nbsp;&nbsp;<?php echo wfMessage( 'courseeditor-recycle-bin' ); ?></div>
<!-- List group -->
<div class="list-group">
<div class="row">
<div class="col-md-8">
<div id="chaptersList"></div>
<div id="saveDiv"></div>
</div>
<div class="col-md-4">
<div id="undoStack">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading"><i class="fa fa-recycle" aria-hidden="true"></i>&nbsp;&nbsp;<?php echo wfMessage( 'courseeditor-recycle-bin' ); ?></div>
<!-- List group -->
<div class="list-group">
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div id="saveDiv" class="text-center">
<button type="button" class="btn btn-lg btn-success" id="saveSectionButton"><?php echo wfMessage('courseeditor-save-section') ?></button>
</div>
<?php
}
}
@@ -47,21 +54,27 @@ public function execute() {
?>
<p><?php echo wfMessage( 'courseeditor-organize-sections' ); ?></p>
<h2 id="courseName"><?php echo htmlspecialchars($courseName) ?></h2>
<div class="col-md-8">
<div id="sectionsList"></div>
<div id="saveDiv"></div>
</div>
<div class="col-md-4">
<div id="undoStack">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading"><i class="fa fa-recycle" aria-hidden="true"></i>&nbsp;&nbsp;<?php echo wfMessage( 'courseeditor-recycle-bin' ); ?></div>
<!-- List group -->
<div class="list-group">
<div class="row">
<div class="col-md-8">
<div id="sectionsList"></div>
</div>
<div class="col-md-4">
<div id="undoStack">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading"><i class="fa fa-recycle" aria-hidden="true"></i>&nbsp;&nbsp;<?php echo wfMessage( 'courseeditor-recycle-bin' ); ?></div>
<!-- List group -->
<div class="list-group">
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div id="saveDiv" class="text-center">
<button type="button" class="btn btn-lg btn-success" id="saveCourseButton"><?php echo wfMessage('courseeditor-save-course') ?></button>
</div>
<?php
}
}
View
@@ -23,20 +23,20 @@ $(function () {
var fieldInput = new OO.ui.FieldLayout( textInputWidget);
//Create save button
var buttonSave = new OO.ui.ButtonWidget( {
/*var buttonSave = new OO.ui.ButtonWidget( {
id: 'saveCourse',
label: OO.ui.deferMsg( 'courseeditor-save-course' ),
flags: ['constructive'],
} );
buttonSave.$label.append("<i class='fa fa-floppy-o pull-left' aria-hidden='true'></i>");
buttonSave.$label.append("<i class='fa fa-floppy-o pull-left' aria-hidden='true'></i>");*/
//Append all created elements to DOM
$('#sectionsList').append(fieldDrag.$element, fieldInput.$element);
$('#saveDiv').append('<br><br>', buttonSave.$element);
//$('#saveDiv').append('<br><br>', buttonSave.$element);
initHandlers(draggableWidget, textInputWidget, editStack);
$('#saveCourse').click(function(){
$('#saveCourseButton').click(function(){
var newSections = [];
$.each(draggableWidget.getItems(), function(key, value){
newSections.push(value.data);
View
@@ -23,21 +23,21 @@ $(function () {
var fieldInput = new OO.ui.FieldLayout( textInputWidget);
//Create save button
var buttonSave = new OO.ui.ButtonWidget( {
/*var buttonSave = new OO.ui.ButtonWidget( {
id: 'saveSection',
label: OO.ui.deferMsg( 'courseeditor-save-section' ),
flags: ['constructive'],
} );
buttonSave.$label.append("<i class='fa fa-floppy-o pull-left' aria-hidden='true'></i>");
buttonSave.$label.append("<i class='fa fa-floppy-o pull-left' aria-hidden='true'></i>");*/
//Append all created elements to DOM
$('#chaptersList').append(fieldDrag.$element, fieldInput.$element);
$('#saveDiv').append('<br><br>', buttonSave.$element);
//$('#saveDiv').append('<br><br>', buttonSave.$element);
//Init Handlers
initHandlers(draggableWidget, textInputWidget, editStack);
$('#saveSection').click(function(){
$('#saveSectionButton').click(function(){
var newChapters = [];
$.each(draggableWidget.getItems(), function(key, value){
newChapters.push(value.data);

0 comments on commit 6e11bf6

Please sign in to comment.