[Logilogi-svn] SF.net SVN: logilogi:[1732] trunk
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2010-06-25 14:22:22
|
Revision: 1732
http://logilogi.svn.sourceforge.net/logilogi/?rev=1732&view=rev
Author: wybow
Date: 2010-06-25 14:22:16 +0000 (Fri, 25 Jun 2010)
Log Message:
-----------
Updated inserts
Modified Paths:
--------------
trunk/app/controllers/application_controller.rb
trunk/app/controllers/comments_controller.rb
trunk/app/controllers/linked_logis_controller.rb
trunk/app/controllers/logis_controller.rb
trunk/app/views/logi_inserts/new.html.erb
trunk/config/locales/en.yml
trunk/public/javascripts/application.js
trunk/public/javascripts/body_inserter.js
trunk/public/stylesheets/logilogi.css
Modified: trunk/app/controllers/application_controller.rb
===================================================================
--- trunk/app/controllers/application_controller.rb 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/app/controllers/application_controller.rb 2010-06-25 14:22:16 UTC (rev 1732)
@@ -432,7 +432,13 @@
:user_group => current_prefs.user_group)
logi_version = logi.current_logi_version
- if options[:untagged]
+ if options[:untagged] == :if_unset
+ if logi_hash[:link_string].nil? or logi_hash[:link_string].empty?
+ logi.untag
+ else
+ self.tag_with_link(logi, logi_hash[:link_string])
+ end
+ elsif options[:untagged]
logi.untag
else
if logi_hash[:link_string].nil? or logi_hash[:link_string].empty?
Modified: trunk/app/controllers/comments_controller.rb
===================================================================
--- trunk/app/controllers/comments_controller.rb 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/app/controllers/comments_controller.rb 2010-06-25 14:22:16 UTC (rev 1732)
@@ -84,15 +84,10 @@
@selected = 'new_logi'
end
else # new logi
- if params[:from_blog]
- @commenting_logi, @commenting_logi_version = self.create_logi(
- params[:logi], :untagged => true)
- else
- @commenting_logi, @commenting_logi_version = self.create_logi(
- params[:logi], :untagged => true)
- @commenting = Commenting.new(:from_logi => @logi,
- :to_logi => @commenting_logi, :user => current_user)
- end
+ @commenting_logi, @commenting_logi_version = self.create_logi(
+ params[:logi], :untagged => :if_unset)
+ @commenting = Commenting.new(:from_logi => @logi,
+ :to_logi => @commenting_logi, :user => current_user)
transfer_errors(@commenting_logi, @logi)
Modified: trunk/app/controllers/linked_logis_controller.rb
===================================================================
--- trunk/app/controllers/linked_logis_controller.rb 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/app/controllers/linked_logis_controller.rb 2010-06-25 14:22:16 UTC (rev 1732)
@@ -34,7 +34,7 @@
def create
@new_logi, @new_logi_version = self.create_logi(
- params[:logi], :untagged => true)
+ params[:logi], :untagged => :if_unset)
body_with_inserts = params[:body_with_inserts]
if body_with_inserts !~ /#{Const::Logi::INSERT_STRING}/
Modified: trunk/app/controllers/logis_controller.rb
===================================================================
--- trunk/app/controllers/logis_controller.rb 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/app/controllers/logis_controller.rb 2010-06-25 14:22:16 UTC (rev 1732)
@@ -127,9 +127,11 @@
format.html
format.js do
self.new_edit_js_response
- render :template => 'logis/index_new_edit.js.rjs', :locals => {
- :name => "logi_tags_edit_list",
- :url => (current_context.link? ? "/" + current_context.link.to_s + "/do/new" : "/do/new")}
+ if !params[:selected]
+ render :template => 'logis/index_new_edit.js.rjs', :locals => {
+ :name => "logi_tags_edit_list",
+ :url => (current_context.link? ? "/" + current_context.link.to_s + "/do/new" : "/do/new")}
+ end
end
end
end
@@ -183,9 +185,11 @@
format.html
format.js do
self.new_edit_js_response
- render :template => 'logis/index_new_edit.js.rjs', :locals => {
- :name => "logi_tags_edit_list",
- :url => (current_context.link? ? "/" + current_context.link.to_s + "/do/edit" : nil)}
+ if !params[:selected]
+ render :template => 'logis/index_new_edit.js.rjs', :locals => {
+ :name => "logi_tags_edit_list",
+ :url => (current_context.link? ? "/" + current_context.link.to_s + "/do/edit" : nil)}
+ end
end
end
end
Modified: trunk/app/views/logi_inserts/new.html.erb
===================================================================
--- trunk/app/views/logi_inserts/new.html.erb 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/app/views/logi_inserts/new.html.erb 2010-06-25 14:22:16 UTC (rev 1732)
@@ -50,6 +50,9 @@
<div id="insert_linked_logi"
class="no_for_tags_link no_for_perma_link">
+ <% javascript_tag do -%>
+ logi_tags_edit_list = null;
+ <% end -%>
<%= render :partial => 'logis/edit', :locals => {
:name => 'edit_linked_logi', :logi => @new_logi,
:logi_version => @new_logi_version, :defer => true} %>
Modified: trunk/config/locales/en.yml
===================================================================
--- trunk/config/locales/en.yml 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/config/locales/en.yml 2010-06-25 14:22:16 UTC (rev 1732)
@@ -663,7 +663,7 @@
select_range: "Select the range of text to which you want it to be attached."
select_remove: "Select what you want to detach; links to logis, external links, or comments."
selected_label: "Selected phrase:"
- submit_and_attach: "Submit and attach more"
+ submit_and_attach: "Submit & attach more"
tag_link_tab: Tags
tags_new_logis_are: "When new logis are tagged they will also be linked to."
what_to_insert: "What to attach?"
Modified: trunk/public/javascripts/application.js
===================================================================
--- trunk/public/javascripts/application.js 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/public/javascripts/application.js 2010-06-25 14:22:16 UTC (rev 1732)
@@ -358,7 +358,7 @@
// For editing and new
function logiEditPrepareLink(edit_list) {
- if (typeof(edit_list) != "undefined") {
+ if (typeof(edit_list) != "undefined" && edit_list != null) {
$('logi_link_string').value = edit_list.hidden_tags_string();
}
}
Modified: trunk/public/javascripts/body_inserter.js
===================================================================
--- trunk/public/javascripts/body_inserter.js 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/public/javascripts/body_inserter.js 2010-06-25 14:22:16 UTC (rev 1732)
@@ -110,6 +110,7 @@
}
if (insert_options.hasClassName('linked_logi_selected')) {
this.insert_linked_logi();
+ logiEditPrepareLink(logi_tags_edit_list);
form.action = form.action + "/do/linked_logis";
}
if (insert_options.hasClassName('tags_link_selected')) {
Modified: trunk/public/stylesheets/logilogi.css
===================================================================
--- trunk/public/stylesheets/logilogi.css 2010-06-25 12:17:22 UTC (rev 1731)
+++ trunk/public/stylesheets/logilogi.css 2010-06-25 14:22:16 UTC (rev 1732)
@@ -434,8 +434,11 @@
cursor: pointer;
}
.panel .button {
- margin-left: 1em;
+ margin-left: 0.7em;
}
+.panel .cancel_button {
+ margin-left: 0em;
+}
/**
* Rounded Corners
@@ -1094,6 +1097,9 @@
padding: 0em 0 0.5em 0;
margin-top: 0;
}
+#logi_insert h1 {
+ padding-top: 1em;
+}
.logi h2 {
padding: 0.8em 0 0.5em 0;
}
@@ -1238,6 +1244,7 @@
margin-top: 1em;
font-size: 1em;
}
+#tags_edit .add_button,
#logi_tags_edit .add_button {
margin-top: 0.65em;
}
@@ -1288,7 +1295,7 @@
#logi_edit {
height: 613px;
}
-#logi_insert #logi_edit,
+#logi_inserts_new #logi_edit,
#users_show #logi_edit,
#logis_show #logi_edit {
height: 558px;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|