-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Moodified : Editor design - BUGFIX : Unnecessary code inserted when attaching non-media files - BUGFIX : save - preview button covers toolbar action. - BUGFIX : file attach TTML-html conversion break TTML properties.
- Loading branch information
Showing
5 changed files
with
88 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,86 @@ | ||
@charset "utf-8"; | ||
@charset utf-8; | ||
/* This stylesheet overrides administration panel skin, to make uploader section float. */ | ||
.mce-toolbar-grp{ | ||
position : fixed !important; | ||
height : 30px !important; | ||
z-index : 100; | ||
.mce-toolbar-grp { | ||
position:fixed!important; | ||
height:30px!important; | ||
z-index:100; | ||
top:80px; | ||
left:175px; | ||
background-color : #fff !important; | ||
display:block !important; | ||
border:0 !important; | ||
background:#fff !important; | ||
background-color:#fff!important; | ||
display:block!important; | ||
border:0!important; | ||
background:#fff!important; | ||
} | ||
|
||
.mce-fullscreen { | ||
z-index:2000 !important; | ||
z-index:2000!important; | ||
} | ||
|
||
.mce-container { | ||
margin-left:auto !important; | ||
margin-right:auto !important; | ||
margin-left:auto!important; | ||
margin-right:auto!important; | ||
} | ||
|
||
.mce-stack-layout { | ||
box-shadow:none!important; | ||
} | ||
|
||
.mce-container-body { | ||
background-color:#fff !important; | ||
background-color:#fff!important; | ||
} | ||
|
||
.mce-edit-area { | ||
margin:20px !important; | ||
border:1px #eee dashed !important; | ||
} | ||
.mce-flow-layout { | ||
/* background-color:#f6f6f6 !important;*/ | ||
padding:20px!important; | ||
box-shadow:0 0 5px rgba(0,0,0,0.3); | ||
border:1px #eee solid!important; | ||
} | ||
|
||
#textarea-section { | ||
background-color: transparent !important; | ||
} | ||
#status-container { | ||
display:none; | ||
background-color:transparent!important; | ||
} | ||
|
||
#save-section { | ||
position: fixed !important; | ||
top: 35px; | ||
right:15px; | ||
z-index:100; | ||
position:fixed!important; | ||
top:32px; | ||
height:20px!important; | ||
right:15px; | ||
z-index:100; | ||
} | ||
|
||
#save-section .button-box input { | ||
height:25px !important; | ||
line-height:25px !important; | ||
height:20px!important; | ||
line-height:20px!important; | ||
} | ||
#save-section .button-box .save-button, | ||
#save-section .button-box .list-button { | ||
display: none; | ||
|
||
#saveAndReturnButton { | ||
background-image:linear-gradient(top, #333, #f33)!important; | ||
} | ||
|
||
#upload-section { | ||
background-color : #FFF; | ||
margin : 10px 20px 10px 0; | ||
display:none; | ||
position:fixed; | ||
z-index:140; | ||
border-top:1px solid #bbb; | ||
background-color:#FFF; | ||
margin:10px 20px 10px 0; | ||
display:none; | ||
position:fixed; | ||
z-index:140; | ||
border-top:1px solid #bbb; | ||
top:100%; | ||
bottom:10px; | ||
bottom:10px; | ||
left:50%; | ||
margin-top:-200px; | ||
margin-left:-370px; | ||
border: 1px solid #F2F2F2; | ||
width:900px; | ||
-moz-border-radius: 3px; | ||
-webkit-border-radius: 3px; | ||
border-radius: 3px; | ||
-moz-box-shadow: 0 0 10px rgba(0,0,0,0.3); | ||
-webkit-box-shadow: 0 0 10px rgba(0,0,0,0.3); | ||
box-shadow: 0 0 10px rgba(0,0,0,0.3); | ||
border:1px solid #F2F2F2; | ||
width:900px; | ||
border-radius:3px; | ||
box-shadow:0 0 10px rgba(0,0,0,0.3); | ||
} | ||
#insert-container | ||
{ | ||
position : absolute; | ||
top : 10px; | ||
left : 685px; | ||
width : 100px; | ||
|
||
#insert-container { | ||
position:absolute; | ||
top:10px; | ||
left:685px; | ||
width:100px; | ||
} | ||
|
||
#status-container,#save-section .button-box .save-button,#save-section .button-box .list-button { | ||
display:none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/** | ||
* Textcube editor support for tinyMCE 4 | ||
* Version 2.0.0.140306 | ||
* Version 2.1.0.20140313 | ||
* | ||
* Created : May 30, 2011 | ||
* Last modified : Mar 6, 2014 | ||
* Last modified : Mar 13, 2014 | ||
* | ||
* Copyright 2011, 2014 Jeongkyu Shin <[email protected]> | ||
* Released under LGPL License. | ||
|
@@ -1568,29 +1568,30 @@ tinymce.create('tinymce.Textcube.TTMLsupport', { | |
addObject : function(data) { | ||
var t = this; | ||
var objects = data.objects; | ||
|
||
switch (data.mode) { | ||
case 'Image1L': case 'Image1C': case 'Image1R': | ||
if (t._isMediaFile(objects[0][0])) { | ||
getObject(t.id + "propertyInsertObject_type").value = "url"; | ||
getObject(t.id + "propertyInsertObject_type").value = "url"; | ||
getObject(t.id + "propertyInsertObject_url").value = blogURL + "/attachment/" + objects[0][0]; | ||
t.command("InsertObject"); | ||
return true; | ||
} | ||
// *fall through* | ||
} else { | ||
|
||
} | ||
// *fall through* | ||
case 'Image2C': case 'Image3C': | ||
try { | ||
var src = servicePath + adminSkin + "/image/spacer.gif"; | ||
var moreattrs = ''; | ||
var longdesc; | ||
if (data.mode == 'Image1L' || data.mode == 'Image1C' || data.mode == 'Image1R') { | ||
if (new RegExp("\.(jpe?g|gif|png|bmp)$", "i").test(objects[0][0])) { | ||
if (new RegExp("\.(jpe?g|gif|png|bmp|webm|svg)$", "i").test(objects[0][0])) { | ||
src = t.propertyFilePath + objects[0][0]; | ||
moreattrs = objects[0][1]; | ||
} else { | ||
objects[0][1] = t.styleUnknown; | ||
objects[0][1] = ''; | ||
moreattrs = t.styleUnknown; | ||
} | ||
moreattrs = objects[0][1]; | ||
longdesc = data.mode.substr(5) + '|' + objects[0][0] + '|' + objects[0][1] + '|' + objects[0][2].replaceAll("|", ""); | ||
} else { | ||
moreattrs = 'width="' + (parseInt(data.mode.substr(5)) * 100) + '" height="100"'; | ||
|
@@ -1603,7 +1604,7 @@ tinymce.create('tinymce.Textcube.TTMLsupport', { | |
var className = {Image1L: 'tatterImageLeft', Image1C: 'tatterImageCenter', Image1R: 'tatterImageRight', | ||
Image2C: 'tatterImageDual', Image3C: 'tatterImageTriple'}[data.mode]; | ||
var prefix = '<img class="' + className + '" src="' + src + '" ' + moreattrs + ' longdesc="' + t.addQuot(longdesc) + '" />'; | ||
t.command("Raw", prefix); | ||
t.command("Raw", prefix); | ||
return true; | ||
} catch(e) { } | ||
|
||
|
@@ -1615,6 +1616,7 @@ tinymce.create('tinymce.Textcube.TTMLsupport', { | |
return true; | ||
|
||
case 'ImageFree': | ||
|
||
var prefix = ''; | ||
for (var i = 0; objects[i]; ++i) { | ||
prefix += '<img class="tatterImageFree" src="' + t.propertyFilePath + objects[i][0] + '" longdesc="[##_ATTACH_PATH_##]/' + objects[i][0] + '" ' + objects[i][1] + ' />'; | ||
|
@@ -1642,12 +1644,12 @@ tinymce.create('tinymce.Textcube.TTMLsupport', { | |
//insertTag(t.textarea, '[##_' + code + '_##]', ''); | ||
return true; | ||
} | ||
|
||
return false; | ||
}, | ||
command : function(command, value1, value2) { | ||
var t = this; | ||
switch(command) { | ||
|
||
switch(command) { | ||
case "MoreLessBlock": | ||
t.command("Raw", '<div class="tattermoreless" more=" more.. " less=" less.. "> ', "</div>"); | ||
break; | ||
|
@@ -1691,7 +1693,6 @@ tinymce.create('tinymce.Textcube.TTMLsupport', { | |
case "wm": type = "video/x-ms-wm"; break; | ||
case "wvx": type = "video/x-ms-wvx"; break; | ||
} | ||
|
||
if(type === null) { | ||
alert(s_unknownFileType); | ||
return; | ||
|
@@ -1753,7 +1754,7 @@ tinymce.create('tinymce.Textcube.TTMLsupport', { | |
author : 'Jeongkyu Shin', | ||
authorurl : 'http://www.textcube.org', | ||
infourl : 'http://dev.textcube.org', | ||
version : "2.0" | ||
version : "2.1" | ||
}; | ||
} | ||
}); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters