Fixed Google Drive actions

This commit is contained in:
benweet 2013-04-22 01:39:33 +01:00
parent 5d6f2679e7
commit c6203e15d1
4 changed files with 12 additions and 11 deletions

View File

@ -1 +1 @@
CACHE MANIFEST # v5 CACHE: index.html css/main-min.css js/main-min.js js/require.js img/ajax-loader.gif img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/icons.png img/stackedit-32.ico img/stackedit-promo.png NETWORK: * CACHE MANIFEST # v6 CACHE: index.html css/main-min.css js/main-min.js js/require.js img/ajax-loader.gif img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/icons.png img/stackedit-32.ico img/stackedit-promo.png NETWORK: *

View File

@ -790,7 +790,7 @@ else
return text; return text;
} }
function _DoLists(text) { function _DoLists(text, isInsideParagraphlessListItem) {
// //
// Form HTML ordered (numbered) and unordered (bulleted) lists. // Form HTML ordered (numbered) and unordered (bulleted) lists.
// //
@ -830,7 +830,7 @@ else
var list = m1; var list = m1;
var list_type = (m2.search(/[*+-]/g) > -1) ? "ul" : "ol"; var list_type = (m2.search(/[*+-]/g) > -1) ? "ul" : "ol";
var result = _ProcessListItems(list, list_type); var result = _ProcessListItems(list, list_type, isInsideParagraphlessListItem);
// Trim any trailing whitespace, to put the closing `</$list_type>` // Trim any trailing whitespace, to put the closing `</$list_type>`
// up on the preceding line, to get it past the current stupid // up on the preceding line, to get it past the current stupid
@ -861,7 +861,7 @@ else
var _listItemMarkers = { ol: "\\d+[.]", ul: "[*+-]" }; var _listItemMarkers = { ol: "\\d+[.]", ul: "[*+-]" };
function _ProcessListItems(list_str, list_type) { function _ProcessListItems(list_str, list_type, isInsideParagraphlessListItem) {
// //
// Process the contents of a single ordered or unordered list, splitting it // Process the contents of a single ordered or unordered list, splitting it
// into individual list items. // into individual list items.
@ -937,8 +937,9 @@ else
} }
else { else {
// Recursion for sub-lists: // Recursion for sub-lists:
item = _DoLists(_Outdent(item)); item = _DoLists(_Outdent(item), /* isInsideParagraphlessListItem= */ true);
item = item.replace(/\n$/, ""); // chomp(item) item = item.replace(/\n$/, ""); // chomp(item)
if (!isInsideParagraphlessListItem)
item = _RunSpanGamut(item); item = _RunSpanGamut(item);
} }
last_item_had_a_double_newline = ends_with_double_newline; last_item_had_a_double_newline = ends_with_double_newline;

View File

@ -254,8 +254,8 @@ define(["jquery", "core", "google-helper", "underscore"], function($, core, goog
return; return;
} }
var syncIndex = createSyncAttributes(file.id, file.etag, file.content, file.title); var syncIndex = createSyncAttributes(file.id, file.etag, file.content, file.title);
var fileIndex = fileManager.createFile(file.title, file.content, [syncIndex]); var fileIndex = core.fileManager.createFile(file.title, file.content, [syncIndex]);
fileManager.selectFile(fileIndex); core.fileManager.selectFile(fileIndex);
core.showMessage('"' + file.title + '" created successfully on Google Drive.'); core.showMessage('"' + file.title + '" created successfully on Google Drive.');
}); });
} }
@ -263,9 +263,9 @@ define(["jquery", "core", "google-helper", "underscore"], function($, core, goog
var importIds = []; var importIds = [];
_.each(state.ids, function(id) { _.each(state.ids, function(id) {
var syncIndex = "sync." + PROVIDER_GDRIVE + "." + id; var syncIndex = "sync." + PROVIDER_GDRIVE + "." + id;
var fileIndex = fileManager.getFileIndexFromSync(syncIndex); var fileIndex = core.fileManager.getFileIndexFromSync(syncIndex);
if(fileIndex !== undefined) { if(fileIndex !== undefined) {
fileManager.selectFile(fileIndex); core.fileManager.selectFile(fileIndex);
} }
else { else {
importIds.push(id); importIds.push(id);

2
js/main-min.js vendored

File diff suppressed because one or more lines are too long