You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/03/24 20:30:02 UTC
[1/2] allura git commit: [#7843] ticket:743 Handle quotes in
filenames on commit view
Repository: allura
Updated Branches:
refs/heads/hs/7817 fef712056 -> 4ada51eba (forced update)
[#7843] ticket:743 Handle quotes in filenames on commit view
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/cde1ffce
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/cde1ffce
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/cde1ffce
Branch: refs/heads/hs/7817
Commit: cde1ffce8314d7b3cc78a685b21acb663ae86c16
Parents: 53b5577
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Mar 18 16:36:29 2015 +0000
Committer: Heith Seewald <hs...@slashdotmedia.com>
Committed: Mon Mar 23 17:10:32 2015 -0400
----------------------------------------------------------------------
Allura/allura/templates/repo/commit.html | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/cde1ffce/Allura/allura/templates/repo/commit.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html
index dd0dafe..9c6342f 100644
--- a/Allura/allura/templates/repo/commit.html
+++ b/Allura/allura/templates/repo/commit.html
@@ -132,15 +132,15 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
<div class="inline-diff">
<h6>
{% if type in ('added', 'changed') %}
- <a href="{{commit.url()}}tree/{{h.really_unicode(file)}}">{{h.really_unicode(file)}}</a>
- <a class="commit-diff-link" href="{{commit.url()}}tree/{{h.really_unicode(file)}}?diff={{prev[0]._id if prev else ''}}">Diff</a>
- <a class="commit-diff-link switch-diff-format-link" data-diformat="{{session.diformat}}" data-diffid="diff-{{loop.index}}" href="{{commit.url()}}tree/{{h.really_unicode(file)}}?barediff={{prev[0]._id if prev else ''}}">Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view</a>
+ <a href="{{commit.url()}}tree/{{h.urlquote(h.really_unicode(file))}}">{{h.really_unicode(file)}}</a>
+ <a class="commit-diff-link" href="{{commit.url()}}tree/{{h.urlquote(h.really_unicode(file))}}?diff={{prev[0]._id if prev else ''}}">Diff</a>
+ <a class="commit-diff-link switch-diff-format-link" data-diformat="{{session.diformat}}" data-diffid="diff-{{loop.index}}" href="{{commit.url()}}tree/{{h.urlquote(h.really_unicode(file))}}?barediff={{prev[0]._id if prev else ''}}">Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view</a>
{% elif type == 'removed' %}
- <a href="{{prev[0].url()}}tree/{{h.really_unicode(file)}}">{{h.really_unicode(file)}}</a>
+ <a href="{{prev[0].url()}}tree/{{h.urlquote(h.really_unicode(file))}}">{{h.really_unicode(file)}}</a>
{% elif type == 'copied' %}
- <a href="{{prev[0].url()}}tree/{{h.really_unicode(file.old)}}">{{h.really_unicode(file.old)}}</a>
+ <a href="{{prev[0].url()}}tree/{{h.urlquote(h.really_unicode(file.old))}}">{{h.really_unicode(file.old)}}</a>
to
- <a href="{{commit.url()}}tree/{{h.really_unicode(file.new)}}">{{h.really_unicode(file.new)}}</a>
+ <a href="{{commit.url()}}tree/{{h.urlquote(h.really_unicode(file.new))}}">{{h.really_unicode(file.new)}}</a>
{% endif %}
</h6>
<div id="diff-{{loop.index}}" class="inline-diff-body">
@@ -157,7 +157,7 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
<script type="text/javascript">
diff_queue.push({
selector: '#diff-{{loop.index}}',
- url: '{{commit.url()}}tree/{{h.really_unicode(file)}}?barediff={{prev[0]._id if prev else ''}}'
+ url: '{{commit.url()}}tree/{{h.urlquote(h.really_unicode(file))}}?barediff={{prev[0]._id if prev else ''}}'
});
</script>
{% endif %}
[2/2] allura git commit: [#7817] Replace "mount point" field with URL
field, on tool creation forms
Posted by he...@apache.org.
[#7817] Replace "mount point" field with URL field, on tool creation forms
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/4ada51eb
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/4ada51eb
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/4ada51eb
Branch: refs/heads/hs/7817
Commit: 4ada51ebad22ad78c691dd65ef5f39f45e5798c3
Parents: cde1ffc
Author: Heith Seewald <hs...@slashdotmedia.com>
Authored: Mon Mar 23 16:50:51 2015 -0400
Committer: Heith Seewald <hs...@slashdotmedia.com>
Committed: Tue Mar 24 15:29:32 2015 -0400
----------------------------------------------------------------------
.../ext/admin/templates/project_tools.html | 49 ++++++++++++++++++--
1 file changed, 44 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/4ada51eb/Allura/allura/ext/admin/templates/project_tools.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/project_tools.html b/Allura/allura/ext/admin/templates/project_tools.html
index a51f750..ca372ce 100644
--- a/Allura/allura/ext/admin/templates/project_tools.html
+++ b/Allura/allura/ext/admin/templates/project_tools.html
@@ -26,6 +26,7 @@
{% block header %}Tools{% endblock %}
{% block content %}
+{% set full_url = h.absurl(c.project.url()) %}
<h3>Click to install</h3>
<div class="nested-grid-container">
{% for tool in installable_tools %}
@@ -46,10 +47,14 @@
<form method="post" action="update_mounts?limit={{limit}}&page={{page}}" id="install_form" style="display:none">
<input type="hidden" name="new.ordinal" value="{{total_mounts}}"/>
<input type="hidden" name="new.ep_name" class="new_ep_name">
- <label class="grid-13">Label</label>
- <div class="grid-13"><input type="text" name="new.mount_label" class="new_mount_label"></div>
- <label class="grid-13">Mount Point</label>
- <div class="grid-13"><input type="text" name="new.mount_point" class="new_mount_point"></div>
+ <label class="grid-13" for="new.mount_label">Label</label>
+ <div class="grid-13"><input type="text" name="new.mount_label" class="new_mount_label" title="This will be the name displayed in your project toolbar.">
+ </div>
+ <label class="grid-13" for="new.mount_point">Url Path</label>
+ <div class="grid-13">
+ <input id="id_url_input" type="text" name="new.mount_point" title="The url for this tool relative to {{ full_url }} " class="new_mount_point">
+ <p><span id="full-url-preview" data-url="{{full_url}}"></span></p>
+ </div>
<div class="grid-13">
<small>
* The mount point is the name of the tool as it will appear in a URL.
@@ -172,13 +177,40 @@
{% endblock %}
{% block extra_js %}
-<script type="text/javascript">
+<script>
var defaults = {
{% for tool in installable_tools %}
'{{tool.name}}':{'default_label':'{{tool.app.default_mount_label}}','default_mount':'{{tool.app.default_mount_point}}'}{% if not loop.last %},{% endif %}
{% endfor %}
};
</script>
+<script>
+/* Real-time preview of a Url Path (aka mount point). */
+
+ var url_preview = $('#full-url-preview'); // "Preview Url Path" displayed on when creating a new tool.
+ var full_url = $(url_preview).data().url; // Full url path of current project.
+
+ // Update the url path preview as they type.
+ $('#id_url_input').keyup(function(){
+ url_preview.html(full_url + '<strong class="url-keyword">' + $(this).val() + "</strong>");
+ });
+
+ // Set url_preview to the Url Path Defaults when creating a new tool.
+ $('.installable_tool').find('a').on('click', function () {
+ // Add the link tool's 'nice name'.
+ defaults['external link'] = defaults.link
+ var tool_name = $.trim($(this).text().toLowerCase());
+
+ // If a tool has a default url path, use it for an initial preview.
+ if (defaults[tool_name]) {
+ url_preview.html(full_url + '<strong class="url-keyword">' + defaults[tool_name].default_mount + "</strong>");
+ }
+ else {
+ // No defaults for this tool, so we use the base url to ensure the url_preview is reset.
+ url_preview.html(full_url);
+ }
+ });
+</script>
{% endblock %}
{% block extra_css %}
@@ -195,5 +227,12 @@ div.isnt_sorted > ul.deck {
#configure_grouping_form input[name=grouping_threshold] {
width: 1.5em;
}
+#full-url-preview{
+ color: white;
+ font-size: small;
+}
+#full-url-preview .url-keyword{
+ color: orange;
+}
</style>
{% endblock %}