Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stashing.

  • Loading branch information...
commit 68602b0e744dbaa4ce1f37d30397e0e91c419e63 1 parent 85dc10c
@midas authored
View
16 lib/generators/guilded_assets/templates/jquery-url.js
@@ -190,6 +190,22 @@ jQuery.url = function()
return ( segments[pos] === "" || segments[pos] === undefined ) ? null : segments[pos];
},
+ replaceParams : function( newParams )
+ {
+ setUp();
+ var newUrl = key('protocol') + '://' + key('host');
+ if( key('port') ) newUrl += ':' + key('port');
+ newUrl += key('path');
+
+ var paramStr = '?';
+ for( param in newParams )
+ {
+ paramStr += param + '=' + newParams[param] + '&';
+ }
+
+ return newUrl + paramStr;
+ },
+
attr : key, // provides public access to private 'key' function - see above
param : param // provides public access to private 'param' function - see above
View
8 lib/guilded/rails/view_helpers.rb
@@ -103,6 +103,14 @@ def g_stylesheet_link_tag( *sources )
sources.each { |src| Guilded::Guilder.instance.add_css_source( src, options[:position] ) }
''
end
+
+ # Outputs a conditional ie stylesheet link tag
+ #
+ def g_ie_stylesheet_link_tag( *args )
+ options = {:version => 6}
+ options.merge!( args.extract_options! )
+ output = "<!--[if lte IE #{options[:version]}]>\n #{stylesheet_link_tag( args )}\n<![endif]-->"
+ end
def g_skin_tag( source, skin='default' )
path = "#{RAILS_ROOT}/public/stylesheets/#{GUILDED_JS_FOLDER}#{GUILDED_NS}#{source.to_s}/#{skin}.css"
View
16 rails_generators/guilded_assets/templates/jquery-url.js
@@ -190,6 +190,22 @@ jQuery.url = function()
return ( segments[pos] === "" || segments[pos] === undefined ) ? null : segments[pos];
},
+ replaceParams : function( newParams )
+ {
+ setUp();
+ var newUrl = key('protocol') + '://' + key('host');
+ if( key('port') ) newUrl += ':' + key('port');
+ newUrl += key('path');
+
+ var paramStr = '?';
+ for( param in newParams )
+ {
+ paramStr += param + '=' + newParams[param] + '&';
+ }
+
+ return newUrl + paramStr;
+ },
+
attr : key, // provides public access to private 'key' function - see above
param : param // provides public access to private 'param' function - see above
Please sign in to comment.
Something went wrong with that request. Please try again.