change from double quotes to quotes for all js code

This commit is contained in:
houxg
2016-12-28 13:18:04 +08:00
parent 31a4d1757c
commit 4b27fb5fd1

View File

@@ -55,10 +55,10 @@
}
window.onload = function () {
var dummyP = $("#dummyP");
var pMargin = parseInt(dummyP.css("marginTop"));
var dummyP = $('#dummyP');
var pMargin = parseInt(dummyP.css('marginTop'));
var hr = $('#hr');
var hrHeight = hr.outerHeight() + parseInt(hr.css("marginTop")) + parseInt(hr.css("marginBottom"));
var hrHeight = hr.outerHeight() + parseInt(hr.css('marginTop')) + parseInt(hr.css('marginBottom'));
var contentHeight = window.innerHeight - pMargin - $('#title').outerHeight() - hrHeight;
$('#content').css('height', contentHeight + 'px');
tinymce.init({
@@ -66,7 +66,7 @@
remove_trailing_brs: false,
element_format: 'html',
allow_unsafe_link_target: true,
plugins: "lists",
plugins: 'lists',
toolbar: false,
menubar: false,
inline: true
@@ -115,7 +115,7 @@
if (result) {
return result[0];
} else {
return "";
return '';
}
}
@@ -130,14 +130,14 @@
}
function toggleBulletList() {
tinyMCE.editors[0].execCommand("InsertUnorderedList", false)
tinyMCE.editors[0].execCommand('InsertUnorderedList', false)
var listState = getListState();
listState = listState.toLowerCase() === 'ul';
nativeCallbackHandler.onFormatChange(JSON.stringify({bullet: listState}));
}
function toggleOrderedList() {
tinyMCE.editors[0].execCommand("InsertOrderedList", false)
tinyMCE.editors[0].execCommand('InsertOrderedList', false)
var listState = getListState();
listState = listState.toLowerCase() === 'ol';
nativeCallbackHandler.onFormatChange(JSON.stringify({ordered: listState}));
@@ -160,17 +160,17 @@
}
function enable() {
document.addEventListener("selectionchange", selectionChangeHandler, false);
document.removeEventListener("click", clickHandeler, false);
document.addEventListener('selectionchange', selectionChangeHandler, false);
document.removeEventListener('click', clickHandeler, false);
tinyMCE.editors[0].setMode('design');
titleDiv.setAttribute("contenteditable", true);
}
function disable() {
document.removeEventListener("selectionchange", selectionChangeHandler, false);
document.addEventListener("click", clickHandeler, false);
document.removeEventListener('selectionchange', selectionChangeHandler, false);
document.addEventListener('click', clickHandeler, false);
tinyMCE.editors[0].setMode('readonly');
titleDiv.setAttribute("contenteditable", false);
titleDiv.setAttribute('contenteditable', false);
}
function clickHandeler(e) {
@@ -236,7 +236,7 @@
if (lists.length > 0) {
return lists[0].nodeName.toLowerCase();
} else {
return "";
return '';
}
}