Changeset 1189

Show
Ignore:
Timestamp:
2008-09-25 16:46:40 (3 months ago)
Author:
gaspard
Message:

commit 0f58a8a61abb7a8035f93ddcf56eca779c69a619
Author: Gaspard Bucher <gaspard@teti.ch>

Typo. Forgot to add state:resolved in previous commit.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/nodes_controller.rb

    r1181 r1189  
    2222  before_filter :find_node, :except => [:index, :create, :not_found, :catch_all, :search, :attribute] 
    2323  before_filter :check_path, :only  => [:index, :show] 
    24   after_filter  :change_lang, :only => [:create, :update
     24  after_filter  :change_lang, :only => [:create, :update, :save_text
    2525  layout :popup_layout,     :only   => [:edit, :import] 
    2626   
  • trunk/app/views/documents/show.rhtml

    r829 r1189  
    1 <%# FIXME: = javascript "if (!(opener==undefined || opener.is_editor)) { opener.Zena.update( 'documents', '#{ url_for(:controller=>"document", :action=>"list", :parent_id=>@node.parent_id, :rnd=>rnd) }'); }" %> 
    21<div id='form_errors' class='errors'><%= error_messages_for @node %></div> 
    32<div id='search'><%= search_box %></div> 
     
    98<div class='tab'> 
    109  <div class="document"> 
    11     <p class="btn_x"><%= link_to_function _('btn_x'), "if (!(opener==undefined || opener.is_editor)) { opener.location.href=opener.location.href;}; self.close();" %></p> 
    1210    <table cellspacing="0" borderspacing="0"> 
    1311      <tr> 
    1412        <td class='preview'><p><%= img_tag(@node, :mode=>'pv') %></p><p class='size'><%= fsize(@node.c_size) %></p></td> 
    15         <td class='description'><h3 class='title'><span class='doc_id'><%= @node[:zip] %></span> <%= @node.name %></h3><p class='summary'><%= zazen(@node.v_summary) %></p></td></tr> 
     13        <td class='description'><h3 class='title s<%= @node.version.status %>'><span class='doc_id'><%= @node[:zip] %></span> <%= @node.name %> <%= node_actions(:actions => :all) %></h3><p class='summary'><%= zazen(@node.v_summary) %></p></td></tr> 
    1614    </table> 
    17     <p class='btn_validate'><%= link_to _("upload more"), new_document_path(:parent_id => @node.parent_zip) %> // <%= node_actions(:actions => :all) %> </p> 
     15    <p class='btn_validate'><%= link_to _("upload more"), new_document_path(:parent_id => @node.parent_zip) %> // <%= link_to_function _('close'), "if (!(opener==undefined || opener.is_editor)) { opener.location.href=opener.location.href;}; self.close();" %></p> 
    1816  </div> 
    1917</div> 
  • trunk/app/views/versions/edit.rhtml

    r1121 r1189  
    1212  </div> 
    1313  <div class='validate'> 
    14     <div><input type='submit' onclick="$('loader').style.visibility = 'visible';" value='<%= _('validate') %>'/></div> 
     14    <div><%= submit_to_remote('validate', _('validate'), :url => save_text_node_path(:id => @node[:zip]), :loading=>"$('loader').style.visibility = 'visible';", :complete=>"opener.window.location.href = opener.window.location.href; window.close();") %></div> 
    1515    <div><%= submit_to_remote('save', _('save'), :url => save_text_node_path(:id => @node[:zip]), :loading=>"$('loader').style.visibility = 'visible';") %></div> 
    1616    <% unless @node.version.new_record? %> 
  • trunk/lib/parser/lib/rules/zena.rb

    r1187 r1189  
    695695      res << "%>" 
    696696      if @params[:status] == 'true' || (@params[:status].nil? && @params[:actions]) 
    697         if @html_tag_params[:class] 
    698          "<span class='s<%= #{node}.version.status %>'>#{res}</span>" 
    699         else 
    700           @html_tag_params[:class] = ["'s<%= #{node}.version.status %>'"] 
    701           @html_tag ||= 'span' 
    702           res 
    703         end 
    704       else 
    705         res 
    706       end 
     697        @html_tag ||= 'span' 
     698        add_html_class("s<%= #{node}.version.status %>") 
     699      end 
     700      res 
    707701    end 
    708702     
  • trunk/test/helpers/testhelp.rb

    r1184 r1189  
    11require File.join(File.dirname(__FILE__), '..','test_helper') 
    22require File.join(File.dirname(__FILE__), '..','..','lib','yaml_test') 
     3begin 
     4  require 'turn' 
     5  Test::Unit::UI::Console::TestRunner.use_progressbar = true 
     6rescue MissingSourceFile 
     7  # ignore missing 'turn' testing gem 
     8end 
    39 
    410module TestHelper 
  • trunk/test/helpers/zena_parser/basic.yml

    r1183 r1189  
    359359  src: "<h1 class='title' do='title' status='true' actions='edit,publish'/>" 
    360360  tem: "/node_actions\(:node=>@node, .*:actions=>\"edit,publish\"/" 
    361   res: "/<h1 class='title'><span class='s50'><span id='v_title22'>status title</span><span class='actions'><a.*/nodes/22/versions/0/edit.*/images/page_edit.png'.*/></a>.*</span></span></h1>/" 
     361  res: "/<h1 class='s50 title'><span id='v_title22'>status title</span><span class='actions'><a.*/nodes/22/versions/0/edit.*/images/page_edit.png'.*/></a>.*</span></h1>/" 
    362362 
    363363show_c_width: