Sha256: bbe87acb36bfa3f929f7077cfaeebd656bd74e33530b6b5aaf61454da941cb12

Contents?: true

Size: 1.02 KB

Versions: 20

Compression:

Stored size: 1.02 KB

Contents

// This object provides dynamically generated Rails routes in Javascript.
// A little bit hacky, but the best solution so far. ^_^
<% self.class.send(:include, Alchemy::Engine.routes.url_helpers) %>
if (typeof(Alchemy) === 'undefined') {
	var Alchemy = {};
}

(function($) {

	var routes = {};
	$.extend(Alchemy, routes);

	Alchemy.routes = {

		admin_picture_path: function(id) {
			return '<%= admin_picture_path(:id => 1) %>'.replace(/1/, id);
		},

		admin_trash_path : function(page_id) {
			var url = '<%= admin_trash_path %>';
			if (page_id)
				url += '?page_id=' + page_id;
			return url;
		},

		fold_admin_element_path: function(id) {
			return '<%= fold_admin_element_path(:id => 1) %>'.replace(/1/, id);
		},

		list_admin_elements_path: '<%= list_admin_elements_path %>',
		order_admin_contents_path: '<%= order_admin_contents_path %>',
		order_admin_elements_path: '<%= order_admin_elements_path %>',
		order_admin_pages_path: '<%= order_admin_pages_path %>',
		link_admin_pages_path: '<%= link_admin_pages_path %>'

	}

})(jQuery);

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
alchemy_cms-2.1.12 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.11 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.9.1 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.9 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.8.1 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.8 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.7 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.6 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.5 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.4 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.3 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.2 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.1 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.rc6 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.rc5 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.rc4 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.rc3 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.rc2 app/assets/javascripts/alchemy/alchemy.routes.js.erb
alchemy_cms-2.1.beta6 app/assets/javascripts/alchemy/alchemy.routes.js.erb