Skip to content

Commit

Permalink
fixed fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
onokumus committed Feb 15, 2014
1 parent 98d6e3f commit 542b9a1
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 29 deletions.
7 changes: 4 additions & 3 deletions dist/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,10 @@ body.padTop53 {
height: 6px;
margin: 16px 4px;
}
.full-screen-box {
height: 100% !important;
width: 100% !important;
}
.box.danger .dropdown-menu > li > a:hover,
.box.danger .dropdown-menu > li > a:focus {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
Expand Down Expand Up @@ -893,9 +897,6 @@ body.padTop53 {
margin-left: -10px;
margin-right: -10px;
}
.box .body.full-screen-box {
height: 100% !important;
}
.body.collapse:not(.in) {
padding: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/assets/css/main.min.css

Large diffs are not rendered by default.

13 changes: 5 additions & 8 deletions dist/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,15 +776,12 @@ toggleFullScreen.init();
var boxFullScreen = {
init: function() {
if ((window.screenfull !== undefined) && screenfull.enabled) {
var $toggleButton = $('.full-box'),
$toggledPanel = $toggleButton.parents('.box')[0],
$toggledPanelBody = $toggleButton.parents('.box').children('.body'),
$toggleButtonImage = $toggleButton.children('i');

$toggleButton.on('click', function(e) {
$('.full-box').on('click', function(e) {
var $toggledPanel = $(this).parents('.box')[0];
screenfull.toggle($toggledPanel);
$toggledPanelBody.toggleClass('full-screen-box');
$toggleButtonImage.toggleClass('fa-compress');
$(this).parents('.box').toggleClass('full-screen-box');
$(this).parents('.box').children('.body').toggleClass('full-screen-box');
$(this).children('i').toggleClass('fa-compress');
e.preventDefault();
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion dist/assets/js/main.min.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ <h3 id="download">Download</h3>
<p>Bootstrap 2.3.2
<a href="https://github.com/onokumus/Bootstrap-Admin-Template/archive/v1.2.zip">V.1.2</a>
ready for use</p>
<p>Bootstrap 3.0.3
<a href="https://github.com/onokumus/Bootstrap-Admin-Template/archive/master.zip">V2.1.3</a>
<p>Bootstrap 3.1.1
<a href="https://github.com/onokumus/Bootstrap-Admin-Template/archive/master.zip">V2.1.4</a>
ready <code>dist</code> folder your use</p>
<h3 id="building">Building</h3>
<h4 id="2-1-3-version">2.1.3 Version</h4>
<h4 id="2-1-4-version">2.1.4 Version</h4>
<p>required
<a href="http://nodejs.org/">node.js</a> &amp;
<a href="http://bower.io/">bower</a> &amp;
Expand All @@ -395,7 +395,7 @@ <h4 id="1-2-version">1.2 Version</h4>
$ git submodule update
$ open index.html</code></pre>
<h3 id="demo">Demo</h3>
<h4 id="for-2-1-3-version">For 2.1.3 version</h4>
<h4 id="for-2-1-4-version">For 2.1.4 version</h4>
<p>
<a href="http://demo.onokumus.com/metis/">http://demo.onokumus.com/metis/</a>
</p>
Expand All @@ -405,6 +405,7 @@ <h4 id="for-1-2-version">For 1.2 version</h4>
</p>
<h3 id="release-history">Release History</h3>
<ul>
<li>2014-02-16 v2.1.4 update bootsrap 3.1.1 &amp;&amp; add screenfull.js &amp;&amp; fixed #menu</li>
<li>2014-01-19 v2.1.3 add suitcss &#39;s flex-embed component</li>
<li>2013-11-30 v2.1.2 create menu plugin, rewrite menu.less</li>
<li>2013-10-28 v2.1.1 add bower</li>
Expand Down Expand Up @@ -459,6 +460,7 @@ <h3 id="credits">Credits</h3>
<li> <a href="http://validval.frebsite.nl/">jquery.validVal</a> </li>
<li> <a href="http://jhollingworth.github.io/bootstrap-wysihtml5/">bootstrap-wysihtml5</a> </li>
<li> <a href="https://github.com/suitcss/flex-embed">Suitcss Flex-Embed</a> </li>
<li> <a href="https://github.com/sindresorhus/screenfull.js">screenfull.js</a> </li>
</ul>
<h3 id="licensing">Licensing</h3>
<p>Bootstrap Admin template is open-sourced software licensed under the
Expand Down
13 changes: 5 additions & 8 deletions src/assets/js/app/fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ toggleFullScreen.init();
var boxFullScreen = {
init: function() {
if ((window.screenfull !== undefined) && screenfull.enabled) {
var $toggleButton = $('.full-box'),
$toggledPanel = $toggleButton.parents('.box')[0],
$toggledPanelBody = $toggleButton.parents('.box').children('.body'),
$toggleButtonImage = $toggleButton.children('i');

$toggleButton.on('click', function(e) {
$('.full-box').on('click', function(e) {
var $toggledPanel = $(this).parents('.box')[0];
screenfull.toggle($toggledPanel);
$toggledPanelBody.toggleClass('full-screen-box');
$toggleButtonImage.toggleClass('fa-compress');
$(this).parents('.box').toggleClass('full-screen-box');
$(this).parents('.box').children('.body').toggleClass('full-screen-box');
$(this).children('i').toggleClass('fa-compress');
e.preventDefault();
});
} else {
Expand Down
9 changes: 5 additions & 4 deletions src/assets/less/main/components/box.less
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@
}
}


.full-screen-box {
height: 100% !important;
width: 100% !important;
}

.box {
&.danger {
Expand Down Expand Up @@ -174,9 +177,7 @@
margin-left: -10px;
margin-right: -10px;
}
&.full-screen-box {
height: 100% !important;
}

}
.body.collapse:not(.in) {
padding: 0;
Expand Down

0 comments on commit 542b9a1

Please sign in to comment.