Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'origin/master'

  • Loading branch information...
commit 7dbc9cebc2c453f9585265e242b5359523a6fe11 2 parents 4729e94 + 67eae25
@faceleg faceleg authored
View
16 src/jquery.ui.editor.js
@@ -408,6 +408,7 @@ $.widget('ui.editor',
this.enabled = false;
this.getElement().attr('contenteditable', false)
.removeClass(this.options.baseClass + '-editing');
+ rangy.getSelection().removeAllRanges();
this.fire('disabled');
}
},
@@ -1111,15 +1112,15 @@ $.widget('ui.editor',
ui.wrapper = $('<div class="ui-editor-selectmenu-wrapper"/>')
.append(ui.select.hide());
- ui.selectMenu = $('<div class="ui-selectmenu ui-editor-selectmenu"/>')
+ ui.selectMenu = $('<div class="ui-editor-selectmenu"/>')
.appendTo(ui.wrapper);
- ui.menu = $('<div class="ui-selectmenu-menu ui-editor-selectmenu-menu ui-widget-content ui-corner-bottom ui-corner-tr"/>')
+ ui.menu = $('<div class="ui-editor-selectmenu-menu ui-widget-content ui-corner-bottom ui-corner-tr"/>')
.appendTo(ui.wrapper);
ui.select.find('option').each(function() {
var option = $('<div/>')
- .addClass('ui-selectmenu-menu-item ui-editor-selectmenu-menu-item')
+ .addClass('ui-editor-selectmenu-menu-item')
.addClass('ui-corner-all')
.html($(this).html())
.appendTo(ui.menu)
@@ -1143,11 +1144,11 @@ $.widget('ui.editor',
var text = $('<div/>')
- .addClass('ui-selectmenu-text');
+ .addClass('ui-editor-selectmenu-text');
var icon = $('<div/>')
.addClass('ui-icon ui-icon-triangle-1-s');
ui.button = $('<div/>')
- .addClass('ui-selectmenu-button ui-editor-selectmenu-button ui-button ui-state-default')
+ .addClass('ui-editor-selectmenu-button ui-editor-selectmenu-button ui-button ui-state-default')
.attr('title', ui.title)
.append(text)
.append(icon)
@@ -1159,20 +1160,19 @@ $.widget('ui.editor',
return false;
})
.bind('click.' + editor.widgetName, function() {
- $('.ui-editor-selectmenu-visible').removeClass('ui-editor-selectmenu-visible');
ui.menu.css('min-width', ui.button.outerWidth() + 10);
ui.wrapper.toggleClass('ui-editor-selectmenu-visible');
return false;
});
var selected = ui.select.find('option[value=' + ui.select.val() + ']').html();
- ui.button.find('.ui-selectmenu-text').html(selected);
+ ui.button.find('.ui-editor-selectmenu-text').html(selected);
return ui.wrapper;
},
update: function() {
var selected = this.select.find('option[value=' + this.select.val() + ']').html();
- this.button.find('.ui-selectmenu-text').html(selected);
+ this.button.find('.ui-editor-selectmenu-text').html(selected);
},
val: function() {
var result = this.select.val.apply(this.select, arguments);
View
24 src/plugins/hotkeys/jquery.ui.editor.hotkeys.js
@@ -19,20 +19,21 @@ $.ui.editor.registerPlugin('hotkeys', /** @lends $.editor.plugin.hotkeys.prototy
* Array of action objects.
* For a hotkey triggering a UI action:
*
- <pre>{
- ui: 'textBold', // Name of UI element to be triggered by this hotkey
- key: 'b', // Key triggering this action
- label: 'ctrl + b', // Label to be appended to the UI element's title attribute
- meta: true // True if this hotkey should be combined with CTRL / Command. Default true.
-}</pre>
+ * <pre>{
+ * ui: 'textBold', // Name of UI element to be triggered by this hotkey
+ * key: 'b', // Key triggering this action
+ * label: 'ctrl + b', // Label to be appended to the UI element's title attribute
+ * meta: true // True if this hotkey should be combined with CTRL / Command. Default true.
+ * }</pre>
*
* For a hotkey triggering a custom action:
*
-<pre>{
- callback: function() { alert('triggered!'); },
- key: 't',
- label: 'ctrl + t'
-}</pre>
+ * <pre>{
+ * callback: function() { alert('triggered!'); },
+ * key: 't',
+ * label: 'ctrl + t'
+ * }</pre>
+ *
* @type {Array}
*/
actions: [
@@ -120,6 +121,7 @@ $.ui.editor.registerPlugin('hotkeys', /** @lends $.editor.plugin.hotkeys.prototy
this.indexedActions[this.isNumeric(action.key) ? action.key : action.key.charCodeAt(0)] = action;
if (typeof action.ui !== 'undefined') {
var uiObject = this.editor.getUi(action.ui);
+ // Only trigger if the UI object is enabled
if (typeof uiObject !== 'undefined') {
uiObject.ui.button.attr('title', uiObject.ui.title + ' (' + action.label + ')');
}
View
10 src/theme/components/selectmenu.scss
@@ -13,12 +13,16 @@
.ui-editor-selectmenu-button {
text-align: left;
padding: 3px 18px 5px 5px !important;
+
+ // Pervent floated buttons breaking menu position
+ float: none !important;
+
.ui-icon {
position: absolute;
right: 1px;
top: 8px;
}
- .ui-selectmenu-text {
+ .ui-editor-selectmenu-text {
font-size: $font-size;
}
}
@@ -60,12 +64,12 @@
background-color: inherit;
}
-.ui-selectmenu-button {
+.ui-editor-selectmenu-button {
background: #f5f5f5;
border: 1px solid #ccc;
}
-.ui-editor-buttonset .ui-selectmenu-button {
+.ui-editor-buttonset .ui-editor-selectmenu-button {
&:first-child {
@include border-left-radius();
}
View
10 src/theme/plugins/i18n.scss
@@ -10,26 +10,26 @@
text-align: left;
}
-.ui-editor-wrapper .ui-editor-i18n-select .ui-selectmenu-status {
+.ui-editor-wrapper .ui-editor-i18n-select .ui-editor-selectmenu-status {
font-size: $font-size;
line-height: 10px;
}
-.ui-selectmenu-menu li a, .ui-selectmenu-status {
+.ui-editor-selectmenu-menu li a, .ui-editor-selectmenu-status {
line-height: 12px;
}
-.ui-editor-wrapper .ui-editor-i18n-select .ui-selectmenu-item-icon {
+.ui-editor-wrapper .ui-editor-i18n-select .ui-editor-selectmenu-item-icon {
height: 24px;
width: 24px;
}
-.ui-selectmenu-menu .ui-icon.ui-editor-i18n-en,
+.ui-editor-selectmenu-menu .ui-icon.ui-editor-i18n-en,
.ui-editor-wrapper .ui-icon.ui-editor-i18n-en {
background: inline-image('flags/gb.png') 0 0;
}
-.ui-selectmenu-menu .ui-icon.ui-editor-i18n-zh_CN,
+.ui-editor-selectmenu-menu .ui-icon.ui-editor-i18n-zh_CN,
.ui-editor-wrapper .ui-icon.ui-editor-i18n-zh_CN {
background: inline-image('flags/cn.png') 0 0;
}
View
4 src/theme/plugins/tagmenu.scss
@@ -8,11 +8,11 @@
text-align: left;
}
-.ui-editor-wrapper .ui-editor-selectmenu .ui-editor-selectmenu-button .ui-selectmenu-text {
+.ui-editor-wrapper .ui-editor-selectmenu .ui-editor-selectmenu-button .ui-editor-selectmenu-text {
font-size: $font-size;
line-height: 22px;
}
-.ui-selectmenu-menu li a, .ui-selectmenu-status {
+.ui-editor-selectmenu-menu li a, .ui-editor-selectmenu-status {
line-height: 12px;
}
View
25 src/theme/theme.css
@@ -118,12 +118,13 @@ html body div.ui-wrapper div.ui-dialog-titlebar a.ui-dialog-titlebar-close span.
.ui-editor-selectmenu-button {
text-align: left;
- padding: 3px 18px 5px 5px !important; }
+ padding: 3px 18px 5px 5px !important;
+ float: none !important; }
.ui-editor-selectmenu-button .ui-icon {
position: absolute;
right: 1px;
top: 8px; }
- .ui-editor-selectmenu-button .ui-selectmenu-text {
+ .ui-editor-selectmenu-button .ui-editor-selectmenu-text {
font-size: 13px; }
.ui-editor-selectmenu-wrapper {
@@ -158,11 +159,11 @@ html body div.ui-wrapper div.ui-dialog-titlebar a.ui-dialog-titlebar-close span.
cursor: pointer;
background-color: inherit; }
-.ui-selectmenu-button {
+.ui-editor-selectmenu-button {
background: #f5f5f5;
border: 1px solid #ccc; }
-.ui-editor-buttonset .ui-selectmenu-button:first-child {
+.ui-editor-buttonset .ui-editor-selectmenu-button:first-child {
-moz-border-radius-topleft: 5px;
-webkit-border-top-left-radius: 5px;
-ms-border-top-left-radius: 5px;
@@ -173,7 +174,7 @@ html body div.ui-wrapper div.ui-dialog-titlebar a.ui-dialog-titlebar-close span.
-ms-border-bottom-left-radius: 5px;
-o-border-bottom-left-radius: 5px;
border-bottom-left-radius: 5px; }
-.ui-editor-buttonset .ui-selectmenu-button:last-child {
+.ui-editor-buttonset .ui-editor-selectmenu-button:last-child {
-moz-border-radius-topright: 5px;
-webkit-border-top-right-radius: 5px;
-ms-border-top-right-radius: 5px;
@@ -918,22 +919,22 @@ html body div.ui-wrapper div.ui-dialog-titlebar a.ui-dialog-titlebar-close span.
top: -8px;
text-align: left; }
-.ui-editor-wrapper .ui-editor-i18n-select .ui-selectmenu-status {
+.ui-editor-wrapper .ui-editor-i18n-select .ui-editor-selectmenu-status {
font-size: 13px;
line-height: 10px; }
-.ui-selectmenu-menu li a, .ui-selectmenu-status {
+.ui-editor-selectmenu-menu li a, .ui-editor-selectmenu-status {
line-height: 12px; }
-.ui-editor-wrapper .ui-editor-i18n-select .ui-selectmenu-item-icon {
+.ui-editor-wrapper .ui-editor-i18n-select .ui-editor-selectmenu-item-icon {
height: 24px;
width: 24px; }
-.ui-selectmenu-menu .ui-icon.ui-editor-i18n-en,
+.ui-editor-selectmenu-menu .ui-icon.ui-editor-i18n-en,
.ui-editor-wrapper .ui-icon.ui-editor-i18n-en {
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAflJREFUeNpinDRzn5qN3uFDt16+YWBg+Pv339+KGN0rbVP+//2rW5tf0Hfy/2+mr99+yKpyOl3Ydt8njEWIn8f9zj639NC7j78eP//8739GVUUhNUNuhl8//ysKeZrJ/v7z10Zb2PTQTIY1XZO2Xmfad+f7XgkXxuUrVB6cjPVXef78JyMjA8PFuwyX7gAZj97+T2e9o3d4BWNp84K1NzubTjAB3fH0+fv6N3qP/ir9bW6ozNQCijB8/8zw/TuQ7r4/ndvN5mZgkpPXiis3Pv34+ZPh5t23//79Rwehof/9/NDEgMrOXHvJcrllgpoRN8PFOwy/fzP8+gUlgZI/f/5xcPj/69e/37//AUX+/mXRkN555gsOG2xt/5hZQMwF4r9///75++f3nz8nr75gSms82jfvQnT6zqvXPjC8e/srJQHo9P9fvwNtAHmG4f8zZ6dDc3bIyM2LTNlsbtfM9OPHH3FhtqUz3eXX9H+cOy9ZMB2o6t/Pn0DHMPz/b+2wXGTvPlPGFxdcD+mZyjP8+8MUE6sa7a/xo6Pykn1s4zdzIZ6///8zMGpKM2pKAB0jqy4UE7/msKat6Jw5mafrsxNtWZ6/fjvNLW29qv25pQd///n+5+/fxDDVbcc//P/zx/36m5Ub9zL8+7t66yEROcHK7q5bldMBAgwADcRBCuVLfoEAAAAASUVORK5CYII=') 0 0; }
-.ui-selectmenu-menu .ui-icon.ui-editor-i18n-zh_CN,
+.ui-editor-selectmenu-menu .ui-icon.ui-editor-i18n-zh_CN,
.ui-editor-wrapper .ui-icon.ui-editor-i18n-zh_CN {
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFqSURBVHjaYrzOwPAPjJgYQEDAleHVbhADIvgHLPgHiQ0QQCxAlkR9NW8sw+cV/1gV/7Gb/hV4+vfzhj8Mv/78//Pn/+/f/8AkhH1t0yaAAAJp4I37zyz2lDfu79uqv/++/WYz+cuq/vvLxt8gdb+A5K9/v34B2SyyskBLAAII5JAva/7/+/z367a/f3/8ZuT9+//Pr78vQUrB6n4CSSj6/RuoASCAWEDO/fD3ddEfhv9/OE3/sKj8/n7k9/fDQNUIs/+DVf8HawAIIJCT/v38C3Hr95N/GDh/f94AVvT7N8RUBpjxQAVADQABBNLw/y/Ifwy/f/399ufTOpDBEPf8g5sN0QBEDAwAAQTWABEChgOSA9BVA00E2wAQQCANQBbEif/AzoCqgLkbbBYwWP/+//sXqBYggFhAkfL7D7OkJFCOCSj65zfUeFjwg8z++/ffX5AGoGKAAGI8jhSRyIw/SJH9D4aAYQoQYAA6rnMw1jU2vQAAAABJRU5ErkJggg==') 0 0; }
@@ -1200,11 +1201,11 @@ html body div.ui-wrapper div.ui-dialog-titlebar a.ui-dialog-titlebar-close span.
.ui-editor-wrapper .ui-editor-selectmenu .ui-editor-selectmenu-button .ui-icon {
text-align: left; }
-.ui-editor-wrapper .ui-editor-selectmenu .ui-editor-selectmenu-button .ui-selectmenu-text {
+.ui-editor-wrapper .ui-editor-selectmenu .ui-editor-selectmenu-button .ui-editor-selectmenu-text {
font-size: 13px;
line-height: 22px; }
-.ui-selectmenu-menu li a, .ui-selectmenu-status {
+.ui-editor-selectmenu-menu li a, .ui-editor-selectmenu-status {
line-height: 12px; }
/**
Please sign in to comment.
Something went wrong with that request. Please try again.