Compare commits
3 commits
c32503e1af
...
1905f6843b
Author | SHA1 | Date | |
---|---|---|---|
1905f6843b | |||
43370c5388 | |||
e20a563039 |
5 changed files with 19 additions and 5 deletions
|
@ -27,7 +27,7 @@
|
||||||
*/
|
*/
|
||||||
pandora.chunkupload = function(options) {
|
pandora.chunkupload = function(options) {
|
||||||
var aborted = false,
|
var aborted = false,
|
||||||
chunkSize = options.size || 1024 * 1024,
|
chunkSize = options.size || 1024 * 1024 * 5,
|
||||||
chunkURL,
|
chunkURL,
|
||||||
file = options.file,
|
file = options.file,
|
||||||
bytesAvailable = file.size,
|
bytesAvailable = file.size,
|
||||||
|
|
|
@ -40,7 +40,7 @@ pandora.ui.document = function() {
|
||||||
item = result.data;
|
item = result.data;
|
||||||
var documentTitle = pandora.getWindowTitle(item);
|
var documentTitle = pandora.getWindowTitle(item);
|
||||||
document.title = pandora.getPageTitle(document.location.pathname) || documentTitle;
|
document.title = pandora.getPageTitle(document.location.pathname) || documentTitle;
|
||||||
pandora.$ui.itemTitle
|
pandora.$ui.itemTitle && pandora.$ui.itemTitle
|
||||||
.options({title: '<b>' + (pandora.getDocumentTitle(item)) + '</b>'})
|
.options({title: '<b>' + (pandora.getDocumentTitle(item)) + '</b>'})
|
||||||
.show();
|
.show();
|
||||||
|
|
||||||
|
|
9
static/js/embedDocument.js
Normal file
9
static/js/embedDocument.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
pandora.ui.embedDocument = function() {
|
||||||
|
var that = Ox.Element();
|
||||||
|
pandora.ui.document().appendTo(that)
|
||||||
|
return that;
|
||||||
|
};
|
|
@ -31,14 +31,19 @@ pandora.ui.embedPanel = function() {
|
||||||
that = pandora.ui.embedNavigation(view);
|
that = pandora.ui.embedNavigation(view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (ui.section == 'documents') {
|
||||||
|
that = pandora.ui.embedDocument()
|
||||||
} else if (ui.section == 'edits') {
|
} else if (ui.section == 'edits') {
|
||||||
// FIXME: this is non-standard, see above!
|
// FIXME: this is non-standard, see above!
|
||||||
that = pandora.ui.editPanel(true);
|
that = pandora.ui.editPanel(true);
|
||||||
} else {
|
} else {
|
||||||
that = pandora.ui.embedError(true)
|
that = pandora.ui.embedError(true)
|
||||||
}
|
}
|
||||||
} else if (ui.page == 'documents' && ui.document) {
|
} else if (ui.page == 'document' && ui.part.document) {
|
||||||
that = pandora.ui.embedError(true);
|
ui.document = ui.part.document
|
||||||
|
ui.section = 'documents'
|
||||||
|
ui.page = ''
|
||||||
|
that = pandora.ui.embedDocument()
|
||||||
}
|
}
|
||||||
if (!that) {
|
if (!that) {
|
||||||
that = pandora.ui.embedError();
|
that = pandora.ui.embedError();
|
||||||
|
|
|
@ -154,7 +154,7 @@ pandora.ui.embedPlayer = function() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.bindEvent(function(data, event) {
|
.bindEvent(function(data, event) {
|
||||||
if (Ox.contains(['close', 'paused'], event)) {
|
if (Ox.contains(['close', 'paused', 'position'], event)) {
|
||||||
Ox.$parent.postMessage(event, data);
|
Ox.$parent.postMessage(event, data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue