mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Merge pull request #796 from adi2412/master
Moved nanoscroller to bower components
This commit is contained in:
commit
54cceb4311
8 changed files with 14 additions and 300 deletions
|
@ -72,7 +72,7 @@
|
|||
<!-- end olark code -->
|
||||
|
||||
</head>
|
||||
<body class="clearfix">
|
||||
<body class="nano clearfix">
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<!-- begin facebook code -->
|
||||
|
@ -160,23 +160,5 @@
|
|||
(function(a){if(window.filepicker){return}var b=a.createElement("script");b.type="text/javascript";b.async=!0;b.src=("https:"===a.location.protocol?"https:":"http:")+"//api.filepicker.io/v1/filepicker.js";var c=a.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c);var d={};d._queue=[];var e="pick,pickMultiple,pickAndStore,read,write,writeUrl,export,convert,store,storeUrl,remove,stat,setKey,constructWidget,makeDropPane".split(",");var f=function(a,b){return function(){b.push([a,arguments])}};for(var g=0;g<e.length;g++){d[e[g]]=f(e[g],d._queue)}window.filepicker=d})(document);
|
||||
</script>
|
||||
<!-- end filepicker.io code -->
|
||||
|
||||
<!-- being nanascroller code -->
|
||||
<script type="text/javascript">
|
||||
function renderScrollbar(){
|
||||
$('.nano-pane').css('display','none');
|
||||
$(function(){
|
||||
$('body').nanoScroller();
|
||||
});
|
||||
};
|
||||
|
||||
// Doesn't seem to load when you open for first time.
|
||||
$(function(){
|
||||
setTimeout(function(){
|
||||
$('body').nanoScroller();
|
||||
},1000);
|
||||
});
|
||||
</script>
|
||||
<!-- end nanoscroller code -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
html
|
||||
background-color: #2f261d
|
||||
|
||||
body
|
||||
position: absolute !important
|
||||
|
||||
// https://github.com/twbs/bootstrap/issues/9237 -- need a version that's not !important
|
||||
.secret
|
||||
display: none
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
.thang-name
|
||||
|
||||
.thang-actions.thang-elem
|
||||
.nano-table
|
||||
.nano-table-content
|
||||
.nano
|
||||
.nano-content
|
||||
.action-header(data-i18n="play_level.action_timeline") Action Timeline
|
||||
.table-container
|
||||
.progress-arrow.progress-indicator
|
||||
|
|
|
@ -30,6 +30,10 @@ module.exports = class RootView extends CocoView
|
|||
$el ?= @$el.find('.main-content-area')
|
||||
super($el)
|
||||
|
||||
renderScrollbar: ->
|
||||
$('.nano-pane').css('display','none')
|
||||
$ -> $('.nano').nanoScroller()
|
||||
|
||||
afterInsert: ->
|
||||
# force the browser to scroll to the hash
|
||||
# also messes with the browser history, so perhaps come up with a better solution
|
||||
|
@ -38,7 +42,7 @@ module.exports = class RootView extends CocoView
|
|||
location.hash = ''
|
||||
location.hash = hash
|
||||
@buildLanguages()
|
||||
renderScrollbar()
|
||||
@renderScrollbar()
|
||||
#@$('.antiscroll-wrap').antiscroll() # not yet, buggy
|
||||
|
||||
afterRender: ->
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
"underscore.string": "~2.3.3",
|
||||
"firebase": "~1.0.2",
|
||||
"catiline": "~2.9.3",
|
||||
"d3": "~3.4.4"
|
||||
"d3": "~3.4.4",
|
||||
"nanoscroller": "~0.8.0"
|
||||
},
|
||||
"overrides": {
|
||||
"backbone": {
|
||||
|
|
|
@ -70,7 +70,7 @@ exports.config =
|
|||
stylesheets:
|
||||
defaultExtension: 'sass'
|
||||
joinTo:
|
||||
'stylesheets/app.css': /^(app|vendor)/
|
||||
'stylesheets/app.css': /^(app|vendor|bower_components)/
|
||||
order:
|
||||
before: [
|
||||
'app/styles/bootstrap.scss'
|
||||
|
|
4
vendor/scripts/jquery.nanoscroller.min.js
vendored
4
vendor/scripts/jquery.nanoscroller.min.js
vendored
File diff suppressed because one or more lines are too long
272
vendor/styles/nanoscroller.scss
vendored
272
vendor/styles/nanoscroller.scss
vendored
|
@ -1,272 +0,0 @@
|
|||
//
|
||||
// nanoScrollerJS (Sass)
|
||||
// --------------------------------------------------
|
||||
/** initial setup **/
|
||||
$nanoClass: "nano";
|
||||
$paneClass: "nano-pane";
|
||||
$sliderClass: "nano-slider";
|
||||
$contentClass: "nano-content";
|
||||
|
||||
.#{$nanoClass} {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.#{$contentClass} {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
&:focus {
|
||||
outline: thin dotted;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$paneClass} {
|
||||
width: 10px;
|
||||
background: rgba(0,0,0,.25);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
-webkit-transition: .2s;
|
||||
-moz-transition: .2s;
|
||||
-o-transition: .2s;
|
||||
transition: .2s;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
visibility: hidden\9; // Target only IE7 and IE8 with this hack
|
||||
opacity: .01;
|
||||
|
||||
> .#{$sliderClass} {
|
||||
background: #444;
|
||||
background: rgba(0,0,0,.5);
|
||||
position: relative;
|
||||
margin: 0 1px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.has-scrollbar > .#{$contentClass}::-webkit-scrollbar {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.#{$paneClass} {
|
||||
.#{$nanoClass}:hover > &,
|
||||
&.active,
|
||||
&.flashed {
|
||||
visibility: visible\9; // Target only IE7 and IE8 with this hack
|
||||
opacity: 0.99;
|
||||
}
|
||||
}
|
||||
|
||||
.nano-table {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.nano-table-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
&:focus {
|
||||
outline: thin dotted;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$paneClass} {
|
||||
width: 10px;
|
||||
background: rgba(0,0,0,.25);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
-webkit-transition: .2s;
|
||||
-moz-transition: .2s;
|
||||
-o-transition: .2s;
|
||||
transition: .2s;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
visibility: hidden\9; // Target only IE7 and IE8 with this hack
|
||||
opacity: .01;
|
||||
|
||||
> .#{$sliderClass} {
|
||||
background: #444;
|
||||
background: rgba(0,0,0,.5);
|
||||
position: relative;
|
||||
margin: 0 1px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.has-scrollbar > .nano-table-content::-webkit-scrollbar {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.#{$paneClass} {
|
||||
.nano-table:hover > &,
|
||||
&.active,
|
||||
&.flashed {
|
||||
visibility: visible\9; // Target only IE7 and IE8 with this hack
|
||||
opacity: 0.99;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
|
||||
.nano-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
&:focus {
|
||||
outline: thin dotted;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$paneClass} {
|
||||
width: 10px;
|
||||
background: rgba(0,0,0,.25);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
-webkit-transition: .2s;
|
||||
-moz-transition: .2s;
|
||||
-o-transition: .2s;
|
||||
transition: .2s;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
visibility: hidden\9; // Target only IE7 and IE8 with this hack
|
||||
opacity: .01;
|
||||
|
||||
> .#{$sliderClass} {
|
||||
background: #444;
|
||||
background: rgba(0,0,0,.5);
|
||||
position: relative;
|
||||
margin: 0 1px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.has-scrollbar > .nano-content::-webkit-scrollbar {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.#{$paneClass} {
|
||||
body:hover > &,
|
||||
&.active,
|
||||
&.flashed {
|
||||
visibility: visible\9; // Target only IE7 and IE8 with this hack
|
||||
opacity: 0.99;
|
||||
}
|
||||
}
|
||||
|
||||
// .modal-content{
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// position: absolute;
|
||||
// overflow: hidden;
|
||||
|
||||
// .modal-body {
|
||||
// // position: absolute;
|
||||
// top: 0;
|
||||
// right: 0;
|
||||
// bottom: 0;
|
||||
// left: 0;
|
||||
// overflow: scroll;
|
||||
// overflow-x: hidden;
|
||||
|
||||
// &:focus {
|
||||
// outline: thin dotted;
|
||||
// }
|
||||
|
||||
// &::-webkit-scrollbar {
|
||||
// visibility: hidden;
|
||||
// }
|
||||
// }
|
||||
|
||||
// > .#{$paneClass} {
|
||||
// width: 10px;
|
||||
// background: rgba(255,255,255,.6);
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// right: 0;
|
||||
// bottom: 0;
|
||||
// -webkit-transition: .2s;
|
||||
// -moz-transition: .2s;
|
||||
// -o-transition: .2s;
|
||||
// transition: .2s;
|
||||
// -webkit-border-radius: 5px;
|
||||
// -moz-border-radius: 5px;
|
||||
// border-radius: 5px;
|
||||
// visibility: hidden\9; // Target only IE7 and IE8 with this hack
|
||||
// opacity: .01;
|
||||
|
||||
// > .#{$sliderClass} {
|
||||
// background: #444;
|
||||
// background: rgba(0,0,0,.5);
|
||||
// position: relative;
|
||||
// margin: 0 1px;
|
||||
// -webkit-border-radius: 3px;
|
||||
// -moz-border-radius: 3px;
|
||||
// border-radius: 3px;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// .has-scrollbar > .modal-body::-webkit-scrollbar {
|
||||
// visibility: visible;
|
||||
// }
|
||||
|
||||
// .#{$paneClass} {
|
||||
// .modal-content:hover > &,
|
||||
// &.active,
|
||||
// &.flashed {
|
||||
// visibility: visible\9; // Target only IE7 and IE8 with this hack
|
||||
// opacity: 0.99;
|
||||
// }
|
||||
// }
|
Loading…
Reference in a new issue