Skip to content

Commit

Permalink
removed disable link case I don't need it and it has to be fixed,
Browse files Browse the repository at this point in the history
uncomment preview for now still to fix
  • Loading branch information
steffen.jurrack committed Sep 14, 2012
1 parent 324af30 commit eeaa4cd
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 48 deletions.
3 changes: 1 addition & 2 deletions app/views/banner/_banner.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
.banner_edit
= link_to(l(:button_edit),
{:controller => 'projects', :action => "settings", :id => @project, :tab => 'banner'},
{:class => 'icon banner-icon-edit', :title => l(:button_edit)})
%a.icon.banner-icon-off{:href=>"#", :title=>"#{l(:banner_off)}", :onclick=>"banner_off();"}= l(:button_off)
{:class => 'icon banner-icon-edit', :title => l(:button_edit)})
6 changes: 1 addition & 5 deletions app/views/banner/_before_main_menu.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
= render :partial=>'banner/project_body_bottom'
:javascript
document.observe("dom:loaded", function() {
new Insertion.Before($('main-menu'), $('.project_banner_area'));
});
= render :partial=>'banner/project_body_bottom'
19 changes: 1 addition & 18 deletions app/views/banner/_body_bottom.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,4 @@
-if User.current.admin? && (params[:controller] != 'settings' && params[:action] != 'settings' && params[:id] != 'redmine_banner')
.banner_edit
= link_to l(:button_edit), {:controller => 'settings', :action => 'plugin', :id => 'redmine_banner'},
{:class => 'icon banner-icon-edit', :title => l(:button_edit)}
%a.icon.banner-icon-off{:href=>"#", :onclick=>"", :title=>"#{l(:banner_off)}"}= l(:button_off)

:javascript
function banner_off_moderate(){
if (confirm('#{l(:text_are_you_sure)}')) {
new Ajax.Updater(
'banner_area',
'#{url_for(:controller => :banner, :action => 'off', :moderate => 'yes')}',
{ asynchronous:true,
evalScripts:true,
parameters:'authenticity_token=' + encodeURIComponent('#{form_authenticity_token}')
}
);
};
hideBanner();
return false;
};
{:class => 'icon banner-icon-edit', :title => l(:button_edit)}
16 changes: 1 addition & 15 deletions app/views/banner/_project_body_bottom.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,4 @@
:javascript
jQuery(document).ready(function(){
$('#content h2').after('#{escape_javascript(render('banner/banner', :banner=>banner))}')
});
function banner_off(){
if (confirm('#{l(:text_are_you_sure)}')) {
new Ajax.Updater(
'banner_area',
'#{url_for(:controller => :banner, :action => 'project_banner_off', :project_id => @project)}',
{ asynchronous:true,
evalScripts:true,
parameters:'authenticity_token=' + encodeURIComponent('#{form_authenticity_token}')
}
);
};
hideBanner();
return false;
};
});
9 changes: 5 additions & 4 deletions app/views/banner/_show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
:class => 'wiki-edit' ,:required => true
%br
= wikitoolbar_for "settings_banner_description"
= link_to l(:label_preview),{ :url => { :controller => 'banner', :action => 'preview', :project_id => @project},
:method => 'post', :id => 'banner_preview', :update => 'banner_description_preview', :remote=>true,
:with => "Form.serialize('banner')", :complete => "Element.scrollTo('banner_description_preview')"},
:accesskey => accesskey(:preview)
-#TODO Fix this
-#= link_to l(:label_preview),{ :url => { :controller => 'banner', :action => 'preview', :project_id => @project},
-#:method => 'post', :id => 'banner_preview', :update => 'banner_description_preview', :remote=>true,
-#:with => "Form.serialize('banner')", :complete => "Element.scrollTo('banner_description_preview')"},
-#:accesskey => accesskey(:preview)
#banner_description_preview.wiki
= submit_tag l(:button_save)
9 changes: 5 additions & 4 deletions app/views/settings/_redmine_banner.haml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
%br

= wikitoolbar_for "settings_banner_description"
= link_to l(:label_preview), {:url =>{:controller => 'banner', :action => 'preview'}, :method => 'post',
:id => 'banner_preview', :update => 'banner_description_preview', :with => "Form.serialize('plugin')",
:complete => "Element.scrollTo('banner_description_preview')", :remote=>true},
:accesskey => accesskey(:preview)
-#TODO Fix This
-#= link_to l(:label_preview), {:url =>{:controller => 'banner', :action => 'preview'}, :method => 'post',
-#:id => 'banner_preview', :update => 'banner_description_preview', :with => "Form.serialize('plugin')",
-#:complete => "Element.scrollTo('banner_description_preview')", :remote=>true},
-#:accesskey => accesskey(:preview)
#banner_description_preview.wiki
%p
Expand Down

0 comments on commit eeaa4cd

Please sign in to comment.