Skip to content

Commit

Permalink
4.12.0 stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
mcagigas-at-wiris authored Feb 1, 2018
1 parent ef17562 commit ec76610
Show file tree
Hide file tree
Showing 11 changed files with 346 additions and 121 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.11.0.1383
4.12.0.1384
2 changes: 1 addition & 1 deletion tinymce/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.11.0.1383
4.12.0.1384
312 changes: 268 additions & 44 deletions tinymce/core/core.js

Large diffs are not rendered by default.

36 changes: 0 additions & 36 deletions tinymce/core/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,39 +63,3 @@
width: 140%;
}
}


/* ----- */


/*iPad and iPad Mini specific css*/

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
.wrs_container.wrs_modalIos {
height: 100vh;
}
.wrs_editorContainer.wrs_modalIos {
height: 89vh;
}
.wrs_controls.wrs_modalIos {
height: 11vh;
}
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
.wrs_container.wrs_modalIos {
width: 100vw;
height: 100vh;
}
.wrs_editorContainer.wrs_modalIos {
width: 100vw;
height: 87vh;
}
.wrs_controls.wrs_modalIos {
width: 100vw;
height: 13vh;
}
}


/* ----- */
32 changes: 10 additions & 22 deletions tinymce/core/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,6 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl

var editorElement = editor.getElement();
var editorContainer = document.getElementById('editorContainer');
if (isIOS) {
editorContainer.className += ' wrs_editorContainer wrs_modalIos';
}
editor.insertInto(editorContainer);

// Mathml content.
Expand Down Expand Up @@ -302,17 +299,8 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl

var popup = new PopUpMessage(strings);

if (isIOS) {
// Editor and controls container.
var editorAndControlsContainer = document.getElementById('container');
editorAndControlsContainer.className += ' wrs_container wrs_modalIos';
}

// Submit button.
var controls = document.getElementById('controls');
if (isIOS) {
controls.className += ' wrs_controls wrs_modalIos';
}
var submitButton = document.createElement('input');
submitButton.type = 'button';
submitButton.className = 'wrs_button_accept';
Expand Down Expand Up @@ -435,6 +423,8 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
}else if (e.data.objectName != 'undefined' && e.data.objectName == 'editorClose') {
window.editorListener.setWaitingForChanges(false);
window.editorListener.setIsContentChanged(false);
}else if (e.data.objectName != 'undefined' && e.data.objectName == 'editorResize') {
editor.getElement().style.height = (e.data.arguments[0] - controls.offsetHeight) + "px";
}
});

Expand All @@ -455,17 +445,18 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
var formulaDisplayDiv = document.getElementsByClassName('wrs_formulaDisplay')[0];
wrs_addEvent(formulaDisplayDiv, 'focus', function (e) {
if (_wrs_conf_modalWindow) {
getMethod('_wrs_modalWindow', 'addClassVirtualKeyboard', [], null);
editorElement.style.height = '100%';
getMethod('_wrs_modalWindow', 'openedIosSoftkeyboard', [], null);
}
});

wrs_addEvent(formulaDisplayDiv, 'blur', function (e) {
if (_wrs_conf_modalWindow) {
getMethod('_wrs_modalWindow', 'removeClassVirtualKeyboard', [], null);
editorElement.style.height = '10%';
getMethod('_wrs_modalWindow', 'closedIosSoftkeyboard', [], null);
}
});

// Set editor size
getMethod('_wrs_modalWindow', 'closedIosSoftkeyboard', [], null);
}

// Event for close window and trap focus
Expand All @@ -481,14 +472,11 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
}
});

// Auto resizing.
setInterval(function () {
editorElement.style.height = (document.getElementById('container').offsetHeight - controls.offsetHeight - 10) + 'px';
}, 100);

// Due to IOS use soft keyboard, we don't want to move the cursor to WIRIS editor.
if (!isIOS) {
// Due to IOS use soft keyboard, we don't want to move the cursor to WIRIS editor.
editor.focus();
// Set initial editor height.
editorElement.style.height = (document.getElementById('container').offsetHeight - controls.offsetHeight - 20) + 'px';
}
} else {
setTimeout(wrs_waitForEditor, 100);
Expand Down
29 changes: 15 additions & 14 deletions tinymce/core/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@

.wrs_modal_dialogContainer.wrs_modal_desktop.wrs_maximized {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.wrs_modal_dialogContainer.wrs_modal_desktop.wrs_minimized {
Expand All @@ -172,7 +169,6 @@
position: fixed;
bottom: 0;
right: 0;
margin-right: 10px;
box-shadow: rgba(0, 0, 0, 0.5) 0 2px 8px;
}

Expand Down Expand Up @@ -239,6 +235,14 @@
margin: auto;
}

.wrs_virtual_keyboard {
height: 100%;
width: 100%;
top: 0;
left: 50%;
transform: translate(-50%, 0%);
}

@media all and (orientation: portrait) {
.wrs_modal_dialogContainer.wrs_modal_mobile {
width: 100vmin;
Expand All @@ -251,11 +255,6 @@
height: 100vmin;
margin: auto;
}
.wrs_virtual_keyboard_opened {
width: 100%;
height: 70%;
top: 0;
}
}

@media all and (orientation: landscape) {
Expand All @@ -270,11 +269,6 @@
height: 100vmin;
margin: auto;
}
.wrs_virtual_keyboard_opened {
width: 100%;
height: 44%;
top: 0;
}
}

.wrs_modal_dialogContainer.wrs_modal_badStock {
Expand All @@ -290,3 +284,10 @@
margin: 0 auto;
border-width: 0;
}
.wrs_noselect {
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
12 changes: 12 additions & 0 deletions tinymce/editor_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ var _wrs_int_langCode = 'en';
(function () {
tinymce.create('tinymce.plugins.tiny_mce_wiris', {
init: function (editor, url) {
_wrs_currentEditor = editor;
// Var to access to selected element from all the WIRIS tiny mce functions.
var element;

Expand Down Expand Up @@ -218,6 +219,17 @@ var _wrs_int_langCode = 'en';
});
}

if ('onActivate' in editor) {
editor.onActivate.add( function (editor) {
_wrs_currentEditor = editor;
});
}
else {
editor.on('focus', function (event) {
_wrs_currentEditor = tinymce.activeEditor;
});
}

var onSave = function (editor, params) {
if (typeof _wrs_conf_plugin_loaded !== 'undefined') {
var language = editor.getParam('language');
Expand Down
12 changes: 12 additions & 0 deletions tinymce/editor_plugin_src.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ var _wrs_int_langCode = 'en';
(function () {
tinymce.create('tinymce.plugins.tiny_mce_wiris', {
init: function (editor, url) {
_wrs_currentEditor = editor;
// Var to access to selected element from all the WIRIS tiny mce functions.
var element;

Expand Down Expand Up @@ -218,6 +219,17 @@ var _wrs_int_langCode = 'en';
});
}

if ('onActivate' in editor) {
editor.onActivate.add( function (editor) {
_wrs_currentEditor = editor;
});
}
else {
editor.on('focus', function (event) {
_wrs_currentEditor = tinymce.activeEditor;
});
}

var onSave = function (editor, params) {
if (typeof _wrs_conf_plugin_loaded !== 'undefined') {
var language = editor.getParam('language');
Expand Down
12 changes: 12 additions & 0 deletions tinymce/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ var _wrs_int_langCode = 'en';
(function () {
tinymce.create('tinymce.plugins.tiny_mce_wiris', {
init: function (editor, url) {
_wrs_currentEditor = editor;
// Var to access to selected element from all the WIRIS tiny mce functions.
var element;

Expand Down Expand Up @@ -218,6 +219,17 @@ var _wrs_int_langCode = 'en';
});
}

if ('onActivate' in editor) {
editor.onActivate.add( function (editor) {
_wrs_currentEditor = editor;
});
}
else {
editor.on('focus', function (event) {
_wrs_currentEditor = tinymce.activeEditor;
});
}

var onSave = function (editor, params) {
if (typeof _wrs_conf_plugin_loaded !== 'undefined') {
var language = editor.getParam('language');
Expand Down
12 changes: 12 additions & 0 deletions tinymce/plugin.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ var _wrs_int_langCode = 'en';
(function () {
tinymce.create('tinymce.plugins.tiny_mce_wiris', {
init: function (editor, url) {
_wrs_currentEditor = editor;
// Var to access to selected element from all the WIRIS tiny mce functions.
var element;

Expand Down Expand Up @@ -218,6 +219,17 @@ var _wrs_int_langCode = 'en';
});
}

if ('onActivate' in editor) {
editor.onActivate.add( function (editor) {
_wrs_currentEditor = editor;
});
}
else {
editor.on('focus', function (event) {
_wrs_currentEditor = tinymce.activeEditor;
});
}

var onSave = function (editor, params) {
if (typeof _wrs_conf_plugin_loaded !== 'undefined') {
var language = editor.getParam('language');
Expand Down
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2018010200;
$plugin->release = '4.11.0.1383';
$plugin->version = 2018020100;
$plugin->release = '4.12.0.1384';
$plugin->requires = 2012120300;
$plugin->component = 'tinymce_tiny_mce_wiris';
$plugin->dependencies = array ('filter_wiris' => 2018010200);
$plugin->dependencies = array ('filter_wiris' => 2018020100);
$plugin->maturity = MATURITY_STABLE;

0 comments on commit ec76610

Please sign in to comment.