Closed rpbaltazar closed 9 years ago
This plugin does not depend on bootstrap. You can easily roll your own styles.
https://github.com/johnny/jquery-sortable/blob/master/source/css/_base.sass Do I have to override this file then?
@johnny @rpbaltazar I'm having issues with this file too, since my project doesn't have bootstrap. I have a Rails app with Medium Editor + Medium Editor Insert Plugin that requires jquery-sortable and I have installed jquery-sortable with bower.
Rails compile css and js files.. Then it throws errors, first because of bootstrap that I don't have, and after removing _base.sass
references it show errors because of un-initialized variables $linkColor $grayLighter $grayLight $grayDark
Is it supposed to boostratp file to have this variables?
There seems to indeed be a dependency on Bootstrap:
Undefined variable: "$linkColor"
yeah, it seems to be impossible to run without bootstrap.
anyone made it? 😕
any update on it ? I'm still getting the same problem.
It really looks that is tied to some bootstrap variables/files.
The only workaround that worked for me was editing _base.sass
, commenting boostrap import and setting those un-initialized variables.
// @import bootstrap
$linkColor: blue
$grayLighter: gray
$grayLight: gray
$grayDark: gray
Commenting references to $iconWhiteSpritePath
variable.
And also editing application.js
to reference bootstrap files already included on vendor folder
//= require "./vendor/jquery"
//= require "./vendor/jquery.color"
//= require "./vendor/bootstrap-switch"
//= require "./vendor/bootstrap-scrollspy"
//= require "./vendor/bootstrap-dropdown"
//= require "./vendor/bootstrap-button"
Not the best solution I guess, but it allowed me to keep using it.
It is also causing production asset compilation failure when used with bower-rails since it auto-include & compile that application.css
, unless you rake bower:clean
.
Given that this repo seems to be kinda dead, the best solution so far is @wkurosawa's I guess.
I found out that it crashes, because rails' sprockets tries to compile application.[sass, js]
files and doesn't find bootstrap file. pretty annoying as the plugin doesn't have that dependency. Is it possible to exclude this compilation?
rake bower:clean
doesn't work for me, because it removes important files from other libraries.
It is possible to fix it by creating bootstrap
file (and other dependencies) in vendor/javascripts
folder.
But personally I chose to remove the dependency from Bowerfile
and include jquery-sortable.js
into the repo.
is there any solution?
On the current project I don't use bootstrap. I'm using something that is requiring this plugin. Does it make sense that it is hardly dependent on bootstrap?