From 727f4d170996ea7f7be1ae40ef2be0a083dfaf35 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Wed, 1 Apr 2015 18:26:45 +0200 Subject: [PATCH] some improvement --- sites/all/themes/gui/jee/css/jee.css | 24 ++++---- sites/all/themes/gui/jee/css/jee.scss | 4 +- sites/all/themes/gui/jee/js/jee.js | 41 ++++++++------ .../themes/gui/jee/templates/block.tpl.php | 55 +++++++++++++++++++ .../themes/gui/jee/templates/region.tpl.php | 33 +++++++++++ 5 files changed, 130 insertions(+), 27 deletions(-) create mode 100644 sites/all/themes/gui/jee/templates/block.tpl.php create mode 100644 sites/all/themes/gui/jee/templates/region.tpl.php diff --git a/sites/all/themes/gui/jee/css/jee.css b/sites/all/themes/gui/jee/css/jee.css index 32a3962..33115b3 100644 --- a/sites/all/themes/gui/jee/css/jee.css +++ b/sites/all/themes/gui/jee/css/jee.css @@ -3999,7 +3999,7 @@ div.messages { */ } /* line 178, jee.scss */ -#main > .region, #main > .region > .block-system, #main > .region > .block-system > .content { +#main .block-system { position: relative; width: 100%; height: 100%; @@ -4926,6 +4926,10 @@ body.chapter-displayed #footer { #footer p { margin: 0; } +/* line 862, jee.scss */ +#footer #block-block-1 { + display: none; +} /* __ ____________ ______ @@ -4934,7 +4938,7 @@ body.chapter-displayed #footer { / / / // / ___/ / /___ /_/ /_/___//____/\____/ */ -/* line 869, jee.scss */ +/* line 871, jee.scss */ #loader { position: absolute; top: 50%; @@ -4951,13 +4955,13 @@ body.chapter-displayed #footer { -webkit-transition-property: opacity; transition-property: opacity; } -/* line 880, jee.scss */ +/* line 882, jee.scss */ body.loading #loader { z-index: 1000; opacity: 1; } -/* line 886, jee.scss */ +/* line 888, jee.scss */ #fullscreen-btn { position: fixed; right: 20px; @@ -4971,13 +4975,13 @@ body.loading #loader { background: transparent url("../assets/img/fullscreen-on.png") no-repeat center center; background: none, url("../assets/img/fullscreen-on.svg") no-repeat center center; } -/* line 895, jee.scss */ +/* line 897, jee.scss */ .fullscreen #fullscreen-btn { background: transparent url("../assets/img/fullscreen-off.png") no-repeat center center; background: none, url("../assets/img/fullscreen-off.svg") no-repeat center center; } -/* line 908, jee.scss */ +/* line 910, jee.scss */ .bubble-1 { position: absolute; z-index: 0; @@ -4990,7 +4994,7 @@ body.loading #loader { left: -200px; } -/* line 912, jee.scss */ +/* line 914, jee.scss */ .bubble-2 { position: absolute; z-index: 0; @@ -5003,7 +5007,7 @@ body.loading #loader { right: -400px; } -/* line 917, jee.scss */ +/* line 919, jee.scss */ .star { position: absolute; z-index: 0; @@ -5021,7 +5025,7 @@ body.loading #loader { / /_/ / /___/ /_/ / /_/ / /_/ / /_____/_____/_____/\____/\____/ */ -/* line 931, jee.scss */ +/* line 933, jee.scss */ #fps { position: fixed; bottom: 40px; @@ -5029,7 +5033,7 @@ body.loading #loader { z-index: 1000; } -/* line 937, jee.scss */ +/* line 939, jee.scss */ #nav-cursor { position: absolute; width: 6px; diff --git a/sites/all/themes/gui/jee/css/jee.scss b/sites/all/themes/gui/jee/css/jee.scss index 75143cf..ec67684 100755 --- a/sites/all/themes/gui/jee/css/jee.scss +++ b/sites/all/themes/gui/jee/css/jee.scss @@ -175,7 +175,7 @@ div.messages{ overflow:hidden; z-index: 2; - &>.region, &>.region>.block-system, &>.region>.block-system>.content{ + .block-system{ position:relative; width:100%; height:100%; overflow:hidden; @@ -858,6 +858,8 @@ div.messages{ p{ margin:0; } + + #block-block-1{display:none;} } /* __ ____________ ______ diff --git a/sites/all/themes/gui/jee/js/jee.js b/sites/all/themes/gui/jee/js/jee.js index 950e15e..94e4195 100755 --- a/sites/all/themes/gui/jee/js/jee.js +++ b/sites/all/themes/gui/jee/js/jee.js @@ -172,6 +172,10 @@ jQuery(document).ready(function($) { }) .on('mouseup', function(e){ e.preventDefault(); + + if(e.target !== this) + return false; + console.log('document mouseup'); if(_loaded_chapter || _loaded_static) @@ -207,7 +211,7 @@ jQuery(document).ready(function($) { } }) .on('touchmove', function(e){ - // e.preventDefault(); + e.preventDefault(); console.log('document touchmove'); if(_loaded_chapter || _loaded_static) @@ -482,15 +486,16 @@ jQuery(document).ready(function($) { // click to preview chapter // $('h2.node-title, .field-name-field-partie:first>.field-name-field-vignette', this.$e) this.$e - .on('click', this, function(e){ - // e.stopImmediatePropagation(); - console.log('click on chapter'); - e.stopPropagation(); - e.preventDefault(); + .on('click',this.preview.bind(this)) + // .on('click', this, function(e){ + // // e.stopImmediatePropagation(); + // console.log('click on chapter'); + // e.stopPropagation(); + // e.preventDefault(); - e.data.preview(e); - return false; - }); + // e.data.preview(e); + // return false; + // }); $('.links a', this.$e) .on('click', this, function(e){ @@ -556,17 +561,21 @@ jQuery(document).ready(function($) { this.$e.translate3d({x:this.trans.x,y:this.trans.y}); }; - Chapter.prototype.preview = function(){ + Chapter.prototype.preview = function(e){ + e.stopPropagation(); + e.preventDefault(); + console.log('preview : e',e); + console.log('preview : this',this); + // don't relaunch preview more that one time if(this.is_previewed) return false; - _previewed_chapter = this; - - console.log('preview', this.i); - - this.unMitigate(); + console.log('is_previewed', this.is_previewed); this.is_previewed = true; + _previewed_chapter = this; + + this.unMitigate(); // close other chapters for (var i = _chapitres_len - 1; i >= 0; i--) @@ -575,7 +584,7 @@ jQuery(document).ready(function($) { this.displayPreview(); - // moveToChapter(this); + return false; }; Chapter.prototype.displayPreview = function(e){ diff --git a/sites/all/themes/gui/jee/templates/block.tpl.php b/sites/all/themes/gui/jee/templates/block.tpl.php new file mode 100644 index 0000000..40e5a9d --- /dev/null +++ b/sites/all/themes/gui/jee/templates/block.tpl.php @@ -0,0 +1,55 @@ +subject: Block title. + * - $content: Block content. + * - $block->module: Module that generated the block. + * - $block->delta: An ID for the block, unique within each module. + * - $block->region: The block region embedding the current block. + * - $classes: String of classes that can be used to style contextually through + * CSS. It can be manipulated through the variable $classes_array from + * preprocess functions. The default values can be one or more of the + * following: + * - block: The current template type, i.e., "theming hook". + * - block-[module]: The module generating the block. For example, the user + * module is responsible for handling the default user navigation block. In + * that case the class would be 'block-user'. + * - $title_prefix (array): An array containing additional output populated by + * modules, intended to be displayed in front of the main title tag that + * appears in the template. + * - $title_suffix (array): An array containing additional output populated by + * modules, intended to be displayed after the main title tag that appears in + * the template. + * + * Helper variables: + * - $classes_array: Array of html class attribute values. It is flattened + * into a string within the variable $classes. + * - $block_zebra: Outputs 'odd' and 'even' dependent on each block region. + * - $zebra: Same output as $block_zebra but independent of any block region. + * - $block_id: Counter dependent on each block region. + * - $id: Same output as $block_id but independent of any block region. + * - $is_front: Flags true when presented in the front page. + * - $logged_in: Flags true when the current user is a logged-in member. + * - $is_admin: Flags true when the current user is an administrator. + * - $block_html_id: A valid HTML ID and guaranteed unique. + * + * @see template_preprocess() + * @see template_preprocess_block() + * @see template_process() + * + * @ingroup themeable + */ +?> +
> + + subject): ?> + >subject ?> + + + + +
diff --git a/sites/all/themes/gui/jee/templates/region.tpl.php b/sites/all/themes/gui/jee/templates/region.tpl.php new file mode 100644 index 0000000..426920d --- /dev/null +++ b/sites/all/themes/gui/jee/templates/region.tpl.php @@ -0,0 +1,33 @@ + + + +