Skip to content

Commit

Permalink
4.1.0.1357
Browse files Browse the repository at this point in the history
 Stable version
  • Loading branch information
mcagigas-at-wiris committed Mar 1, 2017
1 parent e972bbe commit 56ebb82
Show file tree
Hide file tree
Showing 22 changed files with 964 additions and 390 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.64.0.1325
4.1.0.1357
957 changes: 623 additions & 334 deletions core/core.js

Large diffs are not rendered by default.

73 changes: 72 additions & 1 deletion core/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@
}
.wrs_buttonContainer {
display: inline;
}

.wrs_buttonContainer.wrs_modalAndroid {
padding-left: 6px;
}

.wrs_modal_open .wrs_buttonContainer {
..wrs_buttonContainer.wrs_modalDesktop {
padding-left: 0px;
}

Expand All @@ -61,3 +64,71 @@
width : 140%;
}
}


/*iPad and iPad Mini*/
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {

.wrs_container.wrs_modalIos {
width: 100vw !important;
height: 100vh !important;
}

.wrs_editorContainer.wrs_modalIos {
width: 100vw !important;
height: 89vh !important;
}

.wrs_controls.wrs_modalIos {
width: 100vw !important;
height: 11vh !important;
}

}

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

.wrs_editorContainer.wrs_modalIos {
width: 100vw !important;
height: 87vh !important;
}

.wrs_controls.wrs_modalIos {
width: 100vw !important;
height: 13vh !important;
}
}

/*iPhone 5*/
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : portrait) {

.wrs_container.wrs_modalIos {
display: inline;
width: 320px !important;
height: 100vh !important;
}

.wrs_editorContainer.wrs_modalIos {
width: 320px !important;
height: 79vh !important;
}

.wrs_controls.wrs_modalIos {
width: 320px !important;
height: 21vh !important;
vertical-align: middle;
}
}
45 changes: 35 additions & 10 deletions core/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
'_wrs_int_path' ,
'_wrs_int_wirisProperties',
'_wrs_int_customEditors',
'_wrs_modalWindowProperties',
'_wrs_int_langCode'
];

// Sometimes (yes, sometimes) internet explorer security policies hides popups
Expand Down Expand Up @@ -160,8 +162,6 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
function wrs_waitForCore() {
if (typeof _wrs_conf_core_loaded != 'undefined' && typeof _wrs_conf_configuration_loaded != 'undefined' && _wrs_conf_configuration_loaded == true) {
// Insert editor.
var lang = new RegExp("lang=([^&]*)","i").exec(window.location);
lang = (lang != null && lang.length > 1) ? lang[1] : "en";
var script = document.createElement('script');
script.type = 'text/javascript';
var editorUrl = _wrs_conf_editorUrl;
Expand All @@ -178,13 +178,13 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
statSaveMode = _wrs_conf_saveMode;
statVersion = _wrs_conf_version;

script.src = editorUrl + "?lang=" + lang + '&stats-editor=' + statEditor + '&stats-mode=' + statSaveMode + '&stats-version=' + statVersion;
script.src = editorUrl + "?lang=" + _wrs_int_langCode + '&stats-editor=' + statEditor + '&stats-mode=' + statSaveMode + '&stats-version=' + statVersion;
document.getElementsByTagName('head')[0].appendChild(script);

// Insert strings.
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = "../lang/" + lang + "/strings.js";
script.src = "../lang/" + _wrs_int_langCode + "/strings.js";
document.getElementsByTagName('head')[0].appendChild(script);
} else {
setTimeout(wrs_waitForCore, 200);
Expand All @@ -208,10 +208,6 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
wrs_addEvent(window, 'load', function () {
function wrs_waitForEditor() {
if ((typeof _wrs_conf_core_loaded != 'undefined') && ('com' in window && 'wiris' in window.com && 'jsEditor' in window.com.wiris)) {
// Class for modal dialog.
if (_wrs_conf_modalWindow) {
document.body.className = !(document.body.className) ? "wrs_modal_open" : document.body.className + " wrs_modal_open";
}

var queryParams = wrs_getQueryParams(window);
var customEditor;
Expand All @@ -235,15 +231,26 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
}
}
}

if (com.wiris.jsEditor.defaultBasePath) {
editor = com.wiris.jsEditor.JsEditor.newInstance(wrs_attributes);
}
else {
editor = new com.wiris.jsEditor.JsEditor('editor', null);
}
_wrs_modalWindowProperties.editor = editor;
// getMethod(null, 'wrs_editorLoaded', [editor], function(editorLoaded){
// });

var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1;
var isIOS = ((ua.indexOf("ipad") > -1) || (ua.indexOf("iphone") > -1));

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

// Mathml content.
Expand All @@ -269,8 +276,17 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
strings = new Object();
}

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 @@ -321,9 +337,9 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl
cancelButton.type = 'button';
cancelButton.className = 'wrs_button_cancel';

if (strings['cancel'] != null){
if (strings['cancel'] != null) {
cancelButton.value = strings['cancel'];
}else{
} else {
cancelButton.value = 'Cancel';
}

Expand All @@ -333,6 +349,15 @@ var _wrs_isNewElement; // Unfortunately we need this variabels as global variabl

buttonContainer.appendChild(cancelButton);

// Class for modal dialog.
if (_wrs_conf_modalWindow) {
if (_wrs_modalWindowProperties.device == 'android') {
buttonContainer.className = buttonContainer.className + ' wrs_modalAndroid';
} else {
buttonContainer.className = buttonContainer.className + ' wrs_modalDesktop';
}
}

/*var manualLink = document.getElementById('a_manual');
if (typeof manualLink != 'undefined' && strings['manual'] != null){
manualLink.innerHTML = strings['manual'];
Expand Down
Binary file added core/icons/general/close_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/general/fulls_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/general/max_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/general/min_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/general/mins_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/hover/close_icon_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/hover/fulls_icon_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/hover/max_icon_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/hover/min_icon_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/icons/hover/mins_icon_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 56ebb82

Please sign in to comment.