File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1212
1313use yii \bootstrap \BootstrapAsset ;
1414use yii \web \AssetBundle ;
15+ use yii \web \JqueryAsset ;
1516
1617/**
1718 * @package dmstr\modules\prototype\assets
@@ -29,6 +30,7 @@ class EditorAsset extends AssetBundle
2930 ];
3031
3132 public $ depends = [
32- BootstrapAsset::class
33+ BootstrapAsset::class,
34+ JqueryAsset::class
3335 ];
3436}
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ $(function(){
1919 }
2020
2121 if ( window . location . pathname . indexOf ( 'new' ) > - 1 ) {
22- console . log ( 'YES' ) ;
2322 tabEl = $ ( '.editor-top-navigation a[data-target="#tab-9999999"]' ) ;
2423 }
2524
@@ -31,5 +30,10 @@ $(function(){
3130 var newActiveHash = $ ( e . target ) . data ( 'target' ) ;
3231 window . location . hash = newActiveHash ;
3332 localStorage . setItem ( localStorageKey , newActiveHash ) ;
34- } )
33+ } ) ;
34+
35+ // remember user to save stuff
36+ window . onbeforeunload = function ( ) {
37+ return true ;
38+ } ;
3539} ) ;
You can’t perform that action at this time.
0 commit comments