various updates
This commit is contained in:
parent
86cb2d7c13
commit
2233205e0e
14 changed files with 259 additions and 80 deletions
|
@ -2,6 +2,11 @@
|
|||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.checkbox-cell {
|
||||
width: 4em;
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
#app-wrap {
|
||||
top: 60px;
|
||||
left: 10px;
|
||||
|
@ -24,6 +29,17 @@
|
|||
top: 60px;
|
||||
overflow: auto;
|
||||
background: rgba(255,255,255,0.9);
|
||||
border: 1px solid #EEE;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 0 80px rgba(0,0,0,0.3) inset 0 0 5px rgba(0,0,0,0.6);
|
||||
-moz-box-shadow: 0 0 80px rgba(0,0,0,0.3) inset 0 0 5px rgba(0,0,0,0.6);
|
||||
-webkit-box-shadow: 0 0 80px rgba(0,0,0,0.3) inset 0 0 5px rgba(0,0,0,0.6);
|
||||
-moz-box-shadow: 0 0 80px rgba(0,0,0,0.3) inset 0 0 5px rgba(0,0,0,0.6);
|
||||
box-shadow: 0 0 80px rgba(0,0,0,0.3) inset 0 0 5px rgba(0,0,0,0.6);
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
|
|
|
@ -16,7 +16,7 @@ $(function(){
|
|||
, interval: 3000 // might be too aggressive; don't want to block UI for large saves.
|
||||
}
|
||||
, wordcount: true
|
||||
, current_filename : 'Untitled Document'
|
||||
, current_filename : $("#page-name").val()
|
||||
, dropbox:
|
||||
{
|
||||
filepath: '/Dillinger/'
|
||||
|
@ -36,7 +36,8 @@ $(function(){
|
|||
, $wordcount = $('#wordcount')
|
||||
, $import_github = $('#import_github')
|
||||
, $wordcounter = $('#wordcounter')
|
||||
, $filename = $('#filename')
|
||||
, $filename = $('#filename'),
|
||||
$pagename = $("#page-name")
|
||||
|
||||
|
||||
// Hash of themes and their respective background colors
|
||||
|
@ -115,10 +116,10 @@ $(function(){
|
|||
*/
|
||||
function getUserProfile(){
|
||||
|
||||
var p
|
||||
var p;
|
||||
|
||||
try{
|
||||
p = JSON.parse( localStorage.profile )
|
||||
p = JSON.parse( localStorage.profile );
|
||||
// Need to merge in any undefined/new properties from last release
|
||||
// Meaning, if we add new features they may not have them in profile
|
||||
p = $.extend(true, profile, p)
|
||||
|
@ -126,9 +127,11 @@ $(function(){
|
|||
p = profile
|
||||
}
|
||||
|
||||
profile = p
|
||||
if (p.filename != $pagename.val()) {
|
||||
updateUserProfile({ filename: $pagename.val(), currentMd: "" });
|
||||
|
||||
// console.dir(profile)
|
||||
}
|
||||
profile = p
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -307,7 +310,7 @@ $(function(){
|
|||
smartLists: true,
|
||||
smartypants: false,
|
||||
langPrefix: 'lang-'
|
||||
})
|
||||
});
|
||||
|
||||
converter = marked;
|
||||
|
||||
|
@ -354,10 +357,10 @@ $(function(){
|
|||
fetchTheme(profile.theme, function(){
|
||||
$theme.find('li > a[data-value="'+profile.theme+'"]').addClass('selected')
|
||||
|
||||
editor.getSession().setUseWrapMode(true)
|
||||
editor.setShowPrintMargin(false)
|
||||
editor.getSession().setUseWrapMode(true);
|
||||
editor.setShowPrintMargin(false);
|
||||
|
||||
editor.getSession().setMode('ace/mode/markdown')
|
||||
editor.getSession().setMode('ace/mode/markdown');
|
||||
|
||||
editor.getSession().setValue( profile.currentMd || editor.getSession().getValue())
|
||||
|
||||
|
@ -366,9 +369,6 @@ $(function(){
|
|||
|
||||
});
|
||||
|
||||
// Set/unset paper background image on preview
|
||||
// TODO: FIX THIS BUG
|
||||
$preview.css('backgroundImage', profile.showPaper ? 'url("'+paperImgPath+'")' : 'url("")' )
|
||||
|
||||
// Set text for dis/enable autosave / word counter
|
||||
$autosave.html( profile.autosave.enabled ? '<i class="icon-remove"></i> Disable Autosave' : '<i class="icon-ok"></i> Enable Autosave' )
|
||||
|
@ -419,6 +419,7 @@ $(function(){
|
|||
if (isManual) {
|
||||
var data = {
|
||||
name: $("#page-name").val(),
|
||||
message: $("#page-message").val(),
|
||||
content: editor.getSession().getValue()
|
||||
};
|
||||
$.post(window.location, data, function(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue