Skip to content

Commit

Permalink
css fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gseilheimer committed Jun 6, 2014
1 parent 922d007 commit 9bcafc0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
19 changes: 13 additions & 6 deletions files/jquery.markitup.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
previewParser: false,
previewParserPath: '',
previewParserVar: 'data',
previewParserAjaxType: 'POST',
resizeHandle: true,
beforeInsert: '',
afterInsert: '',
Expand Down Expand Up @@ -202,7 +203,7 @@
$('li:hover > ul', ul).css('display', 'block');
$.each(markupSet, function() {
var button = this, t = '', title, li, j;
title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');
button.title ? title = (button.key) ? (button.title||'')+' [Ctrl+'+button.key+']' : (button.title||'') : title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');
key = (button.key) ? 'accesskey="'+button.key+'"' : '';
if (button.separator) {
li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
Expand All @@ -211,16 +212,16 @@
for (j = levels.length -1; j >= 0; j--) {
t += levels[j]+"-";
}
li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>')
li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="#" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>')
.bind("contextmenu.markItUp", function() { // prevent contextmenu on mac and allow ctrl+click
return false;
}).bind('click.markItUp', function(e) {
e.preventDefault();
}).bind("focusin.markItUp", function(){
$$.focus();
}).bind('mouseup', function() {
}).bind('mouseup', function(e) {
if (button.call) {
eval(button.call)();
eval(button.call)(e); // Pass the mouseup event to custom delegate
}
setTimeout(function() { markup(button) },1);
return false;
Expand Down Expand Up @@ -544,7 +545,7 @@
writeInPreview(localize(data, 1) );
} else if (options.previewParserPath !== '') {
$.ajax({
type: 'POST',
type: options.previewParserAjaxType,
dataType: 'text',
global: false,
url: options.previewParserPath,
Expand Down Expand Up @@ -636,6 +637,12 @@
function remove() {
$$.unbind(".markItUp").removeClass('markItUpEditor');
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);

var relativeRef = $$.parent('div').parent('div.markItUp').parent('div');
if (relativeRef.length) {
relativeRef.replaceWith($$);
}

$$.data('markItUp', null);
}

Expand All @@ -662,4 +669,4 @@
$('textarea').trigger('insertion', [options]);
}
};
})(jQuery);
})(jQuery);
10 changes: 5 additions & 5 deletions files/skins/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@
min-width: 81px;
}
.markItUpHeader ul .markItUpSeparator {
margin: 0px;
/*width: 1px;*/
height: 1px;
/*overflow: hidden;*/
/*background-color: #CCC;*/
margin: 0 10px;
width: 1px;
height: 16px;
overflow: hidden;
background-color: #CCC;
}
.markItUpHeader ul ul .markItUpSeparator {
width: auto;
Expand Down

0 comments on commit 9bcafc0

Please sign in to comment.