mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 14:06:23 +05:30
Cleaning up
This commit is contained in:
parent
6ff9b03bf3
commit
dcbf9f0700
26 changed files with 488 additions and 488 deletions
|
|
@ -71,19 +71,19 @@
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -113,18 +113,18 @@
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue