You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/08/22 19:05:05 UTC
[2/2] allura git commit: [#8117] post-link
[#8117] post-link
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/f0b0d676
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f0b0d676
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f0b0d676
Branch: refs/heads/db/8117
Commit: f0b0d676a3de5d5a23780bf7cf58929c5e59e2a8
Parents: 74910c7
Author: Dave Brondsema <da...@brondsema.net>
Authored: Fri Aug 19 13:06:52 2016 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Mon Aug 22 15:04:57 2016 -0400
----------------------------------------------------------------------
Allura/allura/public/nf/js/allura-base.js | 10 ++++++++++
ForgeTracker/forgetracker/templates/tracker/ticket.html | 7 -------
ForgeWiki/forgewiki/templates/wiki/master.html | 2 +-
ForgeWiki/forgewiki/templates/wiki/page_edit.html | 2 +-
ForgeWiki/forgewiki/templates/wiki/page_history.html | 2 +-
ForgeWiki/forgewiki/templates/wiki/page_view.html | 2 +-
ForgeWiki/forgewiki/wiki_main.py | 2 +-
7 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/f0b0d676/Allura/allura/public/nf/js/allura-base.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/allura-base.js b/Allura/allura/public/nf/js/allura-base.js
index 7a1d731..93d269c 100644
--- a/Allura/allura/public/nf/js/allura-base.js
+++ b/Allura/allura/public/nf/js/allura-base.js
@@ -210,4 +210,14 @@ $(function(){
twemoji.size = '36x36';
twemoji.parse($('#content_base')[0]);
+
+ $('.post-link').click(function(evt) {
+ var cval = $.cookie('_session_id');
+ evt.preventDefault();
+ $.post(this.href,
+ {_session_id:cval},
+ function(val) { window.location = val.location; },
+ 'json'
+ );
+ });
});
http://git-wip-us.apache.org/repos/asf/allura/blob/f0b0d676/ForgeTracker/forgetracker/templates/tracker/ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/ticket.html b/ForgeTracker/forgetracker/templates/tracker/ticket.html
index afe0253..129c00e 100644
--- a/ForgeTracker/forgetracker/templates/tracker/ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/ticket.html
@@ -233,13 +233,6 @@
$('a.edit_ticket').removeClass('btn_activate');
return false;
});
- $('.post-link').click(function(evt) {
- var cval = $.cookie('_session_id');
- evt.preventDefault();
- $.post(this.href, {_session_id:cval}, function(val)
- { window.location = val.location; },
- 'json');
- });
// delete attachments
$('div.attachment_thumb a.delete_attachment').click(function () {
var cval = $.cookie('_session_id');
http://git-wip-us.apache.org/repos/asf/allura/blob/f0b0d676/ForgeWiki/forgewiki/templates/wiki/master.html
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/templates/wiki/master.html b/ForgeWiki/forgewiki/templates/wiki/master.html
index ad03778..e976399 100644
--- a/ForgeWiki/forgewiki/templates/wiki/master.html
+++ b/ForgeWiki/forgewiki/templates/wiki/master.html
@@ -35,7 +35,7 @@
{% block extra_js %}
<script type="text/javascript">
- $('.post-link').click(function () {
+ $('.post-link-confirm').click(function () {
var dialog_text;
var version = $(this).data("dialog-id");
if (version) {
http://git-wip-us.apache.org/repos/asf/allura/blob/f0b0d676/ForgeWiki/forgewiki/templates/wiki/page_edit.html
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/templates/wiki/page_edit.html b/ForgeWiki/forgewiki/templates/wiki/page_edit.html
index 204b20c..935728f 100644
--- a/ForgeWiki/forgewiki/templates/wiki/page_edit.html
+++ b/ForgeWiki/forgewiki/templates/wiki/page_edit.html
@@ -34,7 +34,7 @@
{% block actions %}
{{ g.icons['eye'].render(href='.', title='View Page') }}
{% if page_exists and h.has_access(page, 'delete')() %}
- {{ g.icons['delete'].render(extra_css='post-link') }}
+ {{ g.icons['delete'].render(extra_css='post-link-confirm') }}
<div class="confirmation_dialog" style="display:none">
{{ g.icons['close'].render(tag='b', extra_css='close') }}
http://git-wip-us.apache.org/repos/asf/allura/blob/f0b0d676/ForgeWiki/forgewiki/templates/wiki/page_history.html
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/templates/wiki/page_history.html b/ForgeWiki/forgewiki/templates/wiki/page_history.html
index dc3027a..72ab9a8 100644
--- a/ForgeWiki/forgewiki/templates/wiki/page_history.html
+++ b/ForgeWiki/forgewiki/templates/wiki/page_history.html
@@ -53,7 +53,7 @@
<td class="tright">
{% if i != 0 and h.has_access(p, 'edit')() %}
{{ g.icons['revert'].render(
- extra_css='post-link',
+ extra_css='post-link-confirm',
title='Revert to version {}'.format(p.version),
**{'data-dialog-id': p.version}) }}
<div class="confirmation_dialog_{{p.version}}" style="display:none">
http://git-wip-us.apache.org/repos/asf/allura/blob/f0b0d676/ForgeWiki/forgewiki/templates/wiki/page_view.html
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/templates/wiki/page_view.html b/ForgeWiki/forgewiki/templates/wiki/page_view.html
index f770ccc..bc1d18a 100644
--- a/ForgeWiki/forgewiki/templates/wiki/page_view.html
+++ b/ForgeWiki/forgewiki/templates/wiki/page_view.html
@@ -46,7 +46,7 @@
{% endif %}
{{ g.icons['history'].render(href='history') }}
{% elif h.has_access(page, 'delete')() %}
- {{ g.icons['undelete'].render(extra_css='post-link') }}
+ {{ g.icons['undelete'].render(extra_css='post-link-confirm') }}
<div class="confirmation_dialog" style="display:none">
{{ g.icons['close'].render(tag='b', extra_css='close') }}
<h1>Confirm page restoration</h1>
http://git-wip-us.apache.org/repos/asf/allura/blob/f0b0d676/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index ace38b6..b6292e4 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -63,7 +63,7 @@ class W:
style='linear')
markdown_editor = ffw.MarkdownEdit()
confirmation = ffw.Lightbox(name='confirm',
- trigger='a.post-link',
+ trigger='a.post-link-confirm',
options="{ modalCSS: { minHeight: 0, width: 'inherit', top: '150px'}}")
label_edit = ffw.LabelEdit()
attachment_add = ffw.AttachmentAdd()