Sha256: 08cfe342184e0dedf42048037d0e9d9a66bb6d68c8db64b070e9d307e79bf32e

Contents?: true

Size: 1.56 KB

Versions: 5

Compression:

Stored size: 1.56 KB

Contents

%h3= path
%h4 Attributes
%form#form{ :method =>'POST' }
  %table{:width => '100%'}
    %thead
      %tr
        %td Name
        %td Description
        %td Allow Read
        %td Allow Write
        %td Type
        %td Value
    %tbody
      - bean.send(get_set_method, params) do |attribute, value, rel_path, param_name|
        %tr
          - #puts "path=#{path} type=#{path.class.name} rel_path=#{rel_path} class=#{rel_path.class.name}"
          %td= link_to_attribute(path, rel_path)
          %td= attribute.description
          %td= attribute.allow_read
          %td= attribute.allow_write
          %td= attribute.type.to_s
          %td= attribute_value_tag(attribute, param_name, value)
  %input{ :type => 'submit', :value => 'Update' }

:javascript
  $("#form").submit(function() {
    $.post("#{attributes_path(path)}", $("#form").serialize(), function(result) {
      $("#content").html(result);
    })
    .error(function(xhr, ajaxOptions, thrownError) { alert("error"); });
    return false;
  });
  -#$().ready(function(){
    -#$.ajaxSetup({
    -#	error:function(x,e){
    -#		if(x.status==0){
    -#		alert('You are offline!!\n Please Check Your Network.');
    -#		}else if(x.status==404){
    -#		alert('Requested URL not found.');
    -#		}else if(x.status==500){
    -#		alert('Internel Server Error.');
    -#		}else if(e=='parsererror'){
    -#		alert('Error.\nParsing JSON Request failed.');
    -#		}else if(e=='timeout'){
    -#		alert('Request Time out.');
    -#		}else {
    -#		alert('Unknow Error.\n'+x.responseText);
    -#		}
    -#	}
    -#});
  -#});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rumx-0.1.1 lib/rumx/server/views/content_attributes.haml.error_attempt
rumx-0.1.0 lib/rumx/server/views/content_attributes.haml.error_attempt
rumx-0.0.8 lib/rumx/server/views/content_attributes.haml.error_attempt
rumx-0.0.7 lib/rumx/server/views/content_attributes.haml.error_attempt
rumx-0.0.6 lib/rumx/server/views/content_attributes.haml.error_attempt