Sha256: 50a4763f78d6a5feb2e4f4adb7494456f92d3a7ea40246b9eebc806de132667f

Contents?: true

Size: 940 Bytes

Versions: 17

Compression:

Stored size: 940 Bytes

Contents

module Knitkit
  module ErpApp
    module Desktop
      class PositionController < Knitkit::ErpApp::Desktop::AppController
        
        def update
          model = DesktopApplication.find_by_internal_identifier('knitkit')
          begin
            current_user.with_capability('drag_item', 'WebsiteTree') do

              params[:position_array].each do |position|
                model = position['klass'].constantize.find(position['id'])
                model.position = position['position'].to_i
                model.save
              end

              render :json => {:success => true}
              
            end
          rescue ErpTechSvcs::Utils::CompassAccessNegotiator::Errors::UserDoesNotHaveCapability=>ex
            render :json => {:success => false, :message => ex.message}
          end
        end
        
      end#PositionController
    end#Desktop
  end#ErpApp
end#Knitkit

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
knitkit-2.1.15 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.14 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.13 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.12 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.11 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.10 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.9 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.8 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.7 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.6 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.5 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.4 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.3 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.2 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.1 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.1.0 app/controllers/knitkit/erp_app/desktop/position_controller.rb
knitkit-2.0.11 app/controllers/knitkit/erp_app/desktop/position_controller.rb