fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8c4fc1e
)
disable cover urls
author
Jan Szejko
<janek37@gmail.com>
Tue, 21 Mar 2017 13:03:22 +0000
(14:03 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Tue, 21 Mar 2017 13:03:22 +0000
(14:03 +0100)
apps/wiki/templates/wiki/tabs/summary_view.html
patch
|
blob
|
history
redakcja/static/js/wiki/view_summary.js
patch
|
blob
|
history
redakcja/static/js/wiki/wikiapi.js
patch
|
blob
|
history
redakcja/urls.py
patch
|
blob
|
history
diff --git
a/apps/wiki/templates/wiki/tabs/summary_view.html
b/apps/wiki/templates/wiki/tabs/summary_view.html
index
8a57769
..
c05040d
100644
(file)
--- a/
apps/wiki/templates/wiki/tabs/summary_view.html
+++ b/
apps/wiki/templates/wiki/tabs/summary_view.html
@@
-3,16
+3,6
@@
<!-- <div class="toolbar">
</div> -->
<div id="summary-view">
<!-- <div class="toolbar">
</div> -->
<div id="summary-view">
- <div class="summary-cover-area">
- <p><img id="summary-cover" class="book-cover"
- {% if revision %}
- src="{% url 'cover_preview' chunk.book.slug chunk.slug revision %}"
- {% else %}
- src="{% url 'cover_preview' chunk.book.slug chunk.slug %}"
- {% endif %}></p>
- <p><button id="summary-cover-refresh">{% trans "Refresh from working copy" %}</button></p>
- </div>
-
<h2>
<label for="title">{% trans "Title" %}:</label>
<span data-ui-editable="true" data-edit-target="meta.displayTitle"
<h2>
<label for="title">{% trans "Title" %}:</label>
<span data-ui-editable="true" data-edit-target="meta.displayTitle"
diff --git
a/redakcja/static/js/wiki/view_summary.js
b/redakcja/static/js/wiki/view_summary.js
index
099a0e8
..
151b10b
100644
(file)
--- a/
redakcja/static/js/wiki/view_summary.js
+++ b/
redakcja/static/js/wiki/view_summary.js
@@
-6,11
+6,6
@@
options.callback = function() {
var self = this;
options.callback = function() {
var self = this;
- // first time page is rendered
- $('#summary-cover-refresh').click(function() {
- self.refreshCover();
- });
-
old_callback.call(this);
}
old_callback.call(this);
}
@@
-19,16
+14,6
@@
SummaryPerspective.prototype = new $.wiki.Perspective();
SummaryPerspective.prototype = new $.wiki.Perspective();
- SummaryPerspective.prototype.refreshCover = function() {
- $('#summary-cover-refresh').attr('disabled', 'disabled');
- this.doc.refreshCover({
- success: function(text) {
- $('#summary-cover').attr('src', text);
- $('#summary-cover-refresh').removeAttr('disabled');
- }
- });
- };
-
SummaryPerspective.prototype.showCharCount = function() {
var cc;
try {
SummaryPerspective.prototype.showCharCount = function() {
var cc;
try {
diff --git
a/redakcja/static/js/wiki/wikiapi.js
b/redakcja/static/js/wiki/wikiapi.js
index
d901e84
..
4a4da5a
100644
(file)
--- a/
redakcja/static/js/wiki/wikiapi.js
+++ b/
redakcja/static/js/wiki/wikiapi.js
@@
-50,9
+50,6
@@
if (vname == "ajax_document_pubmark")
return base_path + "/pubmark/" + arguments[1] + '/';
if (vname == "ajax_document_pubmark")
return base_path + "/pubmark/" + arguments[1] + '/';
- if (vname == "ajax_cover_preview")
- return "/cover/preview/";
-
console.log("Couldn't reverse match:", vname);
return "/404.html";
};
console.log("Couldn't reverse match:", vname);
return "/404.html";
};
@@
-386,25
+383,6
@@
});
};
});
};
- WikiDocument.prototype.refreshCover = function(params) {
- var self = this;
- var data = {
- xml: self.text // TODO: send just DC
- };
- $.ajax({
- url: reverse("ajax_cover_preview"),
- type: "POST",
- data: data,
- success: function(data) {
- params.success(data);
- },
- error: function(xhr) {
- // params.failure("Nie udało się odświeżyć okładki - błąd serwera.");
- }
- });
- };
-
-
WikiDocument.prototype.getLength = function(params) {
var xml = this.text.replace(/\/(\s+)/g, '<br />$1');
var parser = new DOMParser();
WikiDocument.prototype.getLength = function(params) {
var xml = this.text.replace(/\/(\s+)/g, '<br />$1');
var parser = new DOMParser();
diff --git
a/redakcja/urls.py
b/redakcja/urls.py
index
4388105
..
a381caa
100644
(file)
--- a/
redakcja/urls.py
+++ b/
redakcja/urls.py
@@
-28,7
+28,6
@@
urlpatterns = patterns(
url(r'^documents/', include('catalogue.urls')),
url(r'^apiclient/', include('apiclient.urls')),
url(r'^editor/', include('wiki.urls')),
url(r'^documents/', include('catalogue.urls')),
url(r'^apiclient/', include('apiclient.urls')),
url(r'^editor/', include('wiki.urls')),
- url(r'^cover/', include('cover.urls')),
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', dict(packages=['wiki'])),
)
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', dict(packages=['wiki'])),
)