Netbrain has uploaded a new change for review.
https://gerrit.wikimedia.org/r/74594
Change subject: Added support for ctrl+a in the export code window.
......................................................................
Added support for ctrl+a in the export code window.
Change-Id: I6ec9aa3584bf6e0ba98f8fd301fe11313bf8b73a
---
M includes/editor/MapEditorHTML.php
M includes/editor/css/mapeditor.css
M includes/editor/js/mapeditor.js
3 files changed, 26 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Maps
refs/changes/94/74594/1
diff --git a/includes/editor/MapEditorHTML.php
b/includes/editor/MapEditorHTML.php
index 06f7f5d..29efdc2 100644
--- a/includes/editor/MapEditorHTML.php
+++ b/includes/editor/MapEditorHTML.php
@@ -38,7 +38,9 @@
$output = <<<EOT
{$this->getCanvasDiv()}<div style="display: none;">
- <pre id="code-output" title="%1\$s"></pre>
+ <div id="code-output-container" title="%1\$s">
+ <textarea id="code-output" rows="15" readonly></textarea>
+ </div>
<div id="code-input-container" title="%2\$s" >
<p>%3\$s</p>
<textarea id="code-input" rows="15"></textarea>
diff --git a/includes/editor/css/mapeditor.css
b/includes/editor/css/mapeditor.css
index 33c30a4..9c3fe7c 100644
--- a/includes/editor/css/mapeditor.css
+++ b/includes/editor/css/mapeditor.css
@@ -1,8 +1,24 @@
-#code-output, #code-input-container,#code-input {
- height: 100%;
+#code-output-container, #code-input-container,#code-input {
+ height: 100% !important;
width: 100%;
}
+#code-output-container {
+ overflow: visible;
+}
+
+textarea#code-input, textarea#code-output {
+ resize: none;
+}
+
+#code-output {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ border: none;
+ padding: 10px;
+}
+
#map-canvas {
width: 100%;
height: 500px;
diff --git a/includes/editor/js/mapeditor.js b/includes/editor/js/mapeditor.js
index c2c718c..0bba947 100644
--- a/includes/editor/js/mapeditor.js
+++ b/includes/editor/js/mapeditor.js
@@ -729,9 +729,12 @@
code = code.split('\n').join('\r\n');
}
$('#code-output').text(code);
- $('#code-output').dialog({
+ $('#code-output-container').dialog({
modal:true,
- width:'80%'
+ width:'80%',
+ open:function(){
+ $('#code-output').focus();
+ }
});
});
--
To view, visit https://gerrit.wikimedia.org/r/74594
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ec9aa3584bf6e0ba98f8fd301fe11313bf8b73a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Maps
Gerrit-Branch: master
Gerrit-Owner: Netbrain <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits