Mailinglist Archive: yast-commit (1535 mails)

< Previous Next >
[yast-commit] <web-client> master : cleaned failed attempts of transmitting eula text via ajax
  • From: Martin Kudlvasr <mkudlvasr@xxxxxxx>
  • Date: Wed, 14 Oct 2009 21:45:50 +0200
  • Message-id: <E1MyPdK-0007i2-4h@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 0acf671754c9e9fec21f713e03f1af52127aeb6e
Author: Martin Kudlvasr <mkudlvasr@xxxxxxx>
Date: Wed Oct 14 21:45:50 2009 +0200

cleaned failed attempts of transmitting eula text via ajax
javascript string length limitations prevent it
---
plugins/eulas/app/controllers/eulas_controller.rb | 16 +---------------
plugins/eulas/app/views/eulas/show.html.erb | 10 +---------
plugins/eulas/app/views/eulas/show_text.erb | 3 ---
3 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/plugins/eulas/app/controllers/eulas_controller.rb
b/plugins/eulas/app/controllers/eulas_controller.rb
index aa3d257..ab2659f 100644
--- a/plugins/eulas/app/controllers/eulas_controller.rb
+++ b/plugins/eulas/app/controllers/eulas_controller.rb
@@ -5,7 +5,7 @@ require 'enumerator'
class EulasController < ApplicationController
before_filter :login_required
before_filter :ensure_eula_list, :only => [:next, :show]
- before_filter :ensure_id, :only => [:show, :update, :update_text, :show_text]
+ before_filter :ensure_id, :only => [:show, :update]

layout 'main'
include ProxyLoader
@@ -46,20 +46,6 @@ class EulasController < ApplicationController
end
end

- def update_text
- eula_params = params[:lang].nil? ? Hash.new : { :lang => params[:lang][0] }
- @eula = load_proxy_without_permissions "org.opensuse.yast.modules.eulas",
@eula_id, :params => eula_params
- render :update do |page|
- page.replace_html 'eula-text', @eula.text
- end
- end
-
- def show_text
- eula_params = params[:lang].nil? ? Hash.new : { :lang => params[:lang][0] }
- @eula = load_proxy_without_permissions "org.opensuse.yast.modules.eulas",
@eula_id, :params => eula_params
- render :text => @eula.text
- end
-
def show
eula_params = params[:eula_lang].nil? ? Hash.new : { :lang =>
params[:eula_lang] }
@eula = load_proxy_without_permissions "org.opensuse.yast.modules.eulas",
@eula_id, :params => eula_params
diff --git a/plugins/eulas/app/views/eulas/show.html.erb
b/plugins/eulas/app/views/eulas/show.html.erb
index 71f7042..e175cb1 100644
--- a/plugins/eulas/app/views/eulas/show.html.erb
+++ b/plugins/eulas/app/views/eulas/show.html.erb
@@ -2,21 +2,13 @@

<% form_tag :method => :post, :controller => :eulas, :action => :update, :id
=> @eula_id, :class => 'container' do -%>
<%= _("Available translations:") -%>
-<!--
- :onchange => remote_function(:update => "eula-text",
- :url => {:id => @eula_id,
:action => :show_text},
- :with => "'lang='+value")
-
- :onchange => remote_function(:url => {:id => @eula_id,
:action => :update_text},
- :with => "'lang='+value")
--->
<%= select_tag "text_lang",
options_for_select(@eula.available_langs, :selected =>
@eula.text_lang),
:onchange => "location.href='" + (url_for :controller =>
"eulas", :id => @eula_id, :action => :show) + "?eula_lang=' + value"
%>

<br/>
- <textarea "eula-text" cols="90" rows="30" readonly>
+ <textarea cols="95" rows="30" readonly>
<%= @eula.text -%>
</textarea>
<br/>
diff --git a/plugins/eulas/app/views/eulas/show_text.erb
b/plugins/eulas/app/views/eulas/show_text.erb
deleted file mode 100644
index 7c1593b..0000000
--- a/plugins/eulas/app/views/eulas/show_text.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<textarea id="eula-text" cols="90" rows="30" readonly>
- <%= @eula.text -%>
-</textarea>
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages