-
Notifications
You must be signed in to change notification settings - Fork 72
Upgrade to v2.3.2 of Admin-lte #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
291fdc7
9cf9bfb
c48cc38
3f5a45b
d687553
1132cd3
2d9c19b
9b36618
718bd83
cf47a0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ task :update do | |
files = SourceFile.new | ||
files.cleanup | ||
files.fetch | ||
files.convert | ||
end | ||
|
||
task :convert do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,9 +23,6 @@ def fetch | |
# Fetch javascripts | ||
fetch_javascripts(remote, tag) | ||
|
||
# Fetch fonts | ||
fetch_fonts(remote, tag) | ||
|
||
# Fetch stylesheets | ||
fetch_stylesheets(remote, tag) | ||
|
||
|
@@ -36,16 +33,6 @@ def fetch | |
|
||
desc 'convert css to use rails paths', 'make css use rails paths' | ||
|
||
def convert | ||
self.destination_root = 'vendor/assets' | ||
inside destination_root do | ||
#gsub_file 'stylesheets/bootstrap.scss', %r/url\(([^\)]*)\)/, 'image-url(\1)' | ||
gsub_file 'stylesheets/bootstrap.scss', %r/url\('(\.\.\/fonts\/)([^\)]*)'\)/, 'url(font-path(\'\2\'))' | ||
gsub_file 'stylesheets/font-awesome.scss', %r/url\('(\.\.\/fonts\/)([^\)]*)'\)/, 'url(font-path(\'\2\'))' | ||
gsub_file 'stylesheets/ionicons.scss', %r/url\("(\.\.\/fonts\/)([^\)]*)"\)/, 'url(font-path(\'\2\'))' | ||
end | ||
end | ||
|
||
private | ||
def fetch_tags | ||
http = HTTPClient.new | ||
|
@@ -62,85 +49,42 @@ def select(msg, elements) | |
end | ||
|
||
def fetch_javascripts(remote, tag) | ||
js_path = "#{remote}/raw/#{tag}/js" | ||
get "#{js_path}/bootstrap.min.js", 'javascripts/bootstrap.min.js' | ||
get "#{js_path}/AdminLTE/app.js", 'javascripts/admin-lte.js' | ||
end | ||
|
||
def fetch_fonts(remote, tag) | ||
fonts_path = "#{remote}/raw/#{tag}/fonts" | ||
get "#{fonts_path}/FontAwesome.otf", 'fonts/FontAwesome.otf' | ||
get "#{fonts_path}/fontawesome-webfont.eot", 'fonts/fontawesome-webfont.eot' | ||
get "#{fonts_path}/fontawesome-webfont.svg", 'fonts/fontawesome-webfont.svg' | ||
get "#{fonts_path}/fontawesome-webfont.ttf", 'fonts/fontawesome-webfont.ttf' | ||
get "#{fonts_path}/fontawesome-webfont.woff", 'fonts/fontawesome-webfont.woff' | ||
get "#{fonts_path}/glyphicons-halflings-regular.eot", 'fonts/glyphicons-halflings-regular.eot' | ||
get "#{fonts_path}/glyphicons-halflings-regular.svg", 'fonts/glyphicons-halflings-regular.svg' | ||
get "#{fonts_path}/glyphicons-halflings-regular.ttf", 'fonts/glyphicons-halflings-regular.ttf' | ||
get "#{fonts_path}/glyphicons-halflings-regular.woff", 'fonts/glyphicons-halflings-regular.woff' | ||
get "#{fonts_path}/ionicons.eot", 'fonts/ionicons.eot' | ||
get "#{fonts_path}/ionicons.svg", 'fonts/ionicons.svg' | ||
get "#{fonts_path}/ionicons.ttf", 'fonts/ionicons.ttf' | ||
get "#{fonts_path}/ionicons.woff", 'fonts/ionicons.woff' | ||
js_path = "#{remote}/raw/#{tag}/dist/js" | ||
|
||
get "#{js_path}/app.js", 'javascripts/admin-lte.js' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
plugins_path = "#{remote}/raw/#{tag}/plugins" | ||
get "#{plugins_path}/daterangepicker/daterangepicker.js", 'javascripts/daterangepicker.js' | ||
get "#{plugins_path}/timepicker/bootstrap-timepicker.js", 'javascripts/bootstrap-timepicker.js' | ||
get "#{plugins_path}/bootstrap-slider/bootstrap-slider.js", 'javascripts/bootstrap-slider.js' | ||
end | ||
|
||
def fetch_images(remote, tag) | ||
images_path = "#{remote}/raw/#{tag}/img" | ||
images_path = "#{remote}/raw/#{tag}/dist/img" | ||
get "#{images_path}/avatar.png", 'images/avatar.png' | ||
get "#{images_path}/avatar2.png", 'images/avatar2.png' | ||
get "#{images_path}/avatar3.png", 'images/avatar3.png' | ||
end | ||
|
||
def fetch_stylesheets(remote, tag) | ||
# Get Css files | ||
css_path = "#{remote}/raw/#{tag}/css" | ||
get "#{css_path}/bootstrap.css", 'stylesheets/bootstrap.scss' | ||
get "#{css_path}/AdminLTE.css", 'stylesheets/admin-lte.css' | ||
get "#{css_path}/ionicons.css", 'stylesheets/ionicons.scss' | ||
get "#{css_path}/font-awesome.css", 'stylesheets/font-awesome.scss' | ||
css_path = "#{remote}/raw/#{tag}/dist/css" | ||
|
||
get "#{css_path}/AdminLTE.css", 'stylesheets/admin-lte.css' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
get "#{css_path}/skins/skin-purple.css", 'stylesheets/skin-purple.css' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
get "#{css_path}/skins/skin-blue.css", 'stylesheets/skin-blue.css' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing whitespace detected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing whitespace detected. |
||
# Get Plugins stylesheets | ||
plugins_path = "#{remote}/raw/#{tag}/plugins" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing whitespace detected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing whitespace detected. |
||
get "#{plugins_path}/bootstrap-slider/slider.css", 'stylesheets/bootstrap-slider.css' | ||
get "#{plugins_path}/daterangepicker/daterangepicker-bs3.css", 'stylesheets/daterangepicker.css' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [100/80] |
||
get "#{plugins_path}/timepicker/bootstrap-timepicker.css", 'stylesheets/bootstrap-timepicker.css' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [101/80] |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing whitespace detected. |
||
# Get DataTables assets | ||
get "#{css_path}/datatables/images/sort_asc.png", 'stylesheets/datatables/images/sort_asc.png' | ||
get "#{css_path}/datatables/images/sort_asc_disabled.png", 'stylesheets/datatables/images/sort_asc_disabled.png' | ||
get "#{css_path}/datatables/images/sort_both.png", 'stylesheets/datatables/images/sort_both.png' | ||
get "#{css_path}/datatables/images/sort_desc.png", 'stylesheets/datatables/images/sort_desc.png' | ||
get "#{css_path}/datatables/images/sort_desc_disabled.png", 'stylesheets/datatables/images/sort_desc_disabled.png' | ||
get "#{css_path}/datatables/dataTables.bootstrap.css", 'stylesheets/datatables/dataTables.bootstrap.css' | ||
|
||
# Get iCheck assets | ||
icheck_path = "#{css_path}/iCheck" | ||
get "#{icheck_path}/all.css", 'stylesheets/iCheck/all.scss' | ||
get "#{icheck_path}/flat/_all.css", 'stylesheets/iCheck/flat/_all.css' | ||
get "#{icheck_path}/flat/aero.css", 'stylesheets/iCheck/flat/aero.css' | ||
get "#{icheck_path}/flat/aero.png", 'stylesheets/iCheck/flat/aero.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/blue.css", 'stylesheets/iCheck/flat/blue.css' | ||
get "#{icheck_path}/flat/blue.png", 'stylesheets/iCheck/flat/blue.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/flat.css", 'stylesheets/iCheck/flat/flat.css' | ||
get "#{icheck_path}/flat/flat.png", 'stylesheets/iCheck/flat/flat.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/green.css", 'stylesheets/iCheck/flat/green.css' | ||
get "#{icheck_path}/flat/green.png", 'stylesheets/iCheck/flat/green.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/grey.css", 'stylesheets/iCheck/flat/grey.css' | ||
get "#{icheck_path}/flat/grey.png", 'stylesheets/iCheck/flat/grey.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/orange.css", 'stylesheets/iCheck/flat/orange.css' | ||
get "#{icheck_path}/flat/orange.png", 'stylesheets/iCheck/flat/orange.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/pink.css", 'stylesheets/iCheck/flat/pink.css' | ||
get "#{icheck_path}/flat/pink.png", 'stylesheets/iCheck/flat/pink.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/purple.css", 'stylesheets/iCheck/flat/purple.css' | ||
get "#{icheck_path}/flat/purple.png", 'stylesheets/iCheck/flat/purple.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/red.css", 'stylesheets/iCheck/flat/red.css' | ||
get "#{icheck_path}/flat/red.png", 'stylesheets/iCheck/flat/red.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
get "#{icheck_path}/flat/yellow.css", 'stylesheets/iCheck/flat/yellow.css' | ||
get "#{icheck_path}/flat/yellow.png", 'stylesheets/iCheck/flat/yellow.png' | ||
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]' | ||
|
||
# get "#{css_path}/datatables/images/sort_asc.png", 'stylesheets/datatables/images/sort_asc.png' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [100/80] |
||
# get "#{css_path}/datatables/images/sort_asc_disabled.png", 'stylesheets/datatables/images/sort_asc_disabled.png' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [118/80] |
||
# get "#{css_path}/datatables/images/sort_both.png", 'stylesheets/datatables/images/sort_both.png' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [102/80] |
||
# get "#{css_path}/datatables/images/sort_desc.png", 'stylesheets/datatables/images/sort_desc.png' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [102/80] |
||
# get "#{css_path}/datatables/images/sort_desc_disabled.png", 'stylesheets/datatables/images/sort_desc_disabled.png' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [120/80] |
||
# get "#{css_path}/datatables/dataTables.bootstrap.css", 'stylesheets/datatables/dataTables.bootstrap.css' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [110/80] |
||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module AdminLTE | ||
module Rails | ||
VERSION = '1.3.3' | ||
VERSION = '2.3.2' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace detected.