Skip to content

Commit 8d675e0

Browse files
committed
Merge pull request #27 from alfredobarron/dev
Se actualizo a la version 2.1.0
2 parents ca96a0d + 2cf8404 commit 8d675e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+13888
-107
lines changed

.bower.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Extension to ognore
2-
*.zip
3-
41
# Folders to ignore
5-
node_modules
2+
node_modules
3+
.grunt
4+
5+
# Extension to ognore
6+
*.zip

Gruntfile.js

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,53 @@ module.exports = function(grunt){
77
uglify: {
88
js: {
99
files: {
10-
'dist/js/smoke.min.js': ['dist/js/smoke.js']
10+
'docs/dist/js/smoke.min.js': ['docs/dist/js/smoke.js']
1111
}
1212
}
1313
},
1414
cssmin: {
1515
css: {
1616
files: {
17-
'dist/css/smoke.min.css': ['dist/css/smoke.css']
17+
'docs/dist/css/smoke.min.css': ['docs/dist/css/smoke.css']
1818
}
1919
}
2020
},
2121
copy: {
2222
main: {
2323
files: [
2424
// includes files within path
25-
{expand: true, src: ['dist/**'], dest: 'docs/'},
25+
{expand: true, cwd: 'docs/dist/', src: ['**'], dest: 'dist'},
2626
],
2727
},
2828
},
29+
compress: {
30+
main: {
31+
options: {
32+
archive: 'smoke-v2.1.0.zip'
33+
},
34+
files: [
35+
//{src: ['path/*'], dest: 'internal_folder/', filter: 'isFile'}, // includes files in path
36+
//{src: ['path/**'], dest: 'internal_folder2/'}, // includes files in path and its subdirs
37+
{expand: true, cwd: 'dist/', src: ['**'], dest: ''}, // makes all src relative to cwd
38+
//{flatten: true, src: ['path/**'], dest: 'internal_folder4/', filter: 'isFile'} // flattens results to a single level
39+
]
40+
}
41+
},
42+
// Se empujan los archivos de la carpeta docs dentro del repositorio gh-pages en Github
43+
'gh-pages': {
44+
options: {
45+
base: 'docs'
46+
},
47+
src: ['**']
48+
}
2949
});
3050

3151
grunt.loadNpmTasks('grunt-contrib-uglify');
3252
grunt.loadNpmTasks('grunt-contrib-cssmin');
3353
grunt.loadNpmTasks('grunt-contrib-copy');
54+
grunt.loadNpmTasks('grunt-contrib-compress');
55+
grunt.loadNpmTasks('grunt-gh-pages');
3456

35-
grunt.registerTask('default', ['uglify', 'cssmin', 'copy']);
57+
grunt.registerTask('default', ['uglify', 'cssmin', 'copy', 'compress']);
3658

3759
};

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smoke",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"homepage": "https://github.com/alfredobarron/smoke",
55
"authors": [
66
"Alfredo Barron <[email protected]>"

dist/css/smoke.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,16 @@
156156
top: 0;
157157
width: 100%;
158158
height: 100%;
159-
z-index: 999;
159+
z-index: 9999;
160160
}
161-
.panel-full .panel-body{
162-
height: 90%;
161+
.smk-btn-group-panel-title{
162+
top:-22px;
163+
right: -4px
164+
}
165+
.smk-btn-group-panel{
166+
top:-4px;
167+
right: -4px
163168
}
164-
165169

166170

167171

dist/css/smoke.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/smoke.js

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,22 +1087,30 @@ $.fn.smkFullscreen = function() {
10871087

10881088
/*
10891089
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1090-
| Panel config
1090+
| Panel
10911091
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
10921092
*/
1093-
$.fn.smkPanelConfig = function(options) {
1093+
$.fn.smkPanel = function(options) {
10941094
// Variables default
10951095
var settings = $.extend({
1096-
hide: '',
1097-
class: ''
1096+
hide: ''
10981097
}, options);
10991098

11001099
// Se eliminan los espacios en blanco de la variable settings.hide
11011100
var hideSinEspacios = settings.hide.replace(/\s/g, '');
11021101
// Se quiebra la variable hideSinEspacios para obtener sus valores y se agregan en el array arrayHide
11031102
var arrayHide = hideSinEspacios.split(',');
1103+
// Se obtiene el .panel-title de cada panel
1104+
var panelHeading = $(this).children('.panel-heading').children('.panel-title');
1105+
var smkBtnGroupPanel = '';
1106+
if(panelHeading.length > 0){
1107+
smkBtnGroupPanel = 'smk-btn-group-panel-title';
1108+
}else{
1109+
smkBtnGroupPanel = 'smk-btn-group-panel';
1110+
}
1111+
11041112
// Se crea el btn-group
1105-
var btnGroup = '<div class="btn-group btn-group-sm pull-right ' + settings.class + '" role="group">';
1113+
var btnGroup = '<div class="btn-group btn-group-sm pull-right ' + smkBtnGroupPanel + '" role="group">';
11061114
// Se valida que no exista en el array el boton min para poder agregarlo dentro de btnGroup
11071115
if($.inArray('min', arrayHide) == -1){
11081116
btnGroup += '<a class="btn smk-min" href="#"><span class="glyphicon glyphicon-minus" aria-hidden="true"></span></a>';
@@ -1116,10 +1124,9 @@ $.fn.smkPanelConfig = function(options) {
11161124
btnGroup += '<a class="btn smk-full" href="#"><span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span></a>';
11171125
}
11181126
btnGroup += '</div>';
1119-
// Se obtiene el .panel-title de cada panel
1120-
var panelHeading = $(this).children('.panel-heading').children('.panel-title');
1121-
// Se inserta despues del .panel-title
1122-
$(panelHeading).after( btnGroup );
1127+
1128+
// Se inserta dentro de .panel-heading
1129+
$(this).children('.panel-heading').append( btnGroup );
11231130

11241131
// Evento del boton Min
11251132
$('.smk-min').click(function(event) {
@@ -1151,30 +1158,30 @@ $.fn.smkPanelConfig = function(options) {
11511158

11521159
if(panel.hasClass('panel-full')){
11531160
panel.removeClass('panel-full');
1154-
$('.container-fluid').css({'display':'block'});
1155-
$('#content').css({'position':'fixed'});
1156-
$('body').css({'overflow':'auto'});
11571161
$(this).siblings('.btn').show();
11581162
if(iconPlus.length == 1){
11591163
body.hide();
11601164
}
1165+
$('body').css({'overflow':'auto'});
1166+
// $('.container-fluid').css({'display':'block'});
1167+
// $('#content').css({'position':'fixed'});
11611168
}else{
11621169
panel.addClass('panel-full');
1163-
$('.container-fluid').css({'display':'initial'});
1164-
$('#content').css({'position':'initial'});
1165-
$('body').css({'overflow':'hidden'});
11661170
$(this).siblings('.btn').hide();
11671171
if(iconPlus.length == 1){
11681172
body.show();
11691173
}
1174+
$('body').css({'overflow':'hidden'});
1175+
// $('.container-fluid').css({'display':'initial'});
1176+
// $('#content').css({'position':'initial'});
11701177
}
11711178
icon.toggleClass('glyphicon-resize-full').toggleClass('glyphicon-resize-small');
11721179
});
11731180
};
11741181
/*
11751182
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
11761183
| Usage
1177-
| $('.panel').smkPanelConfig({hide: 'min,remove,full', class: 'name-class'});
1184+
| $('.panel').smkPanel({hide: 'min,remove,full', class: 'name-class'});
11781185
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
11791186
*/
11801187

0 commit comments

Comments
 (0)