Skip to content

Commit

Permalink
upd wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
olton committed Jan 26, 2014
1 parent b27853c commit bbb336d
Showing 7 changed files with 48 additions and 41 deletions.
5 changes: 5 additions & 0 deletions compile.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cd compress
node compressor.js

cd ..
cp min/metro.min.js docs/js
2 changes: 1 addition & 1 deletion compress/compressor.js
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ new compressor.minify({
new compressor.minify({
type: 'yui-css',
fileIn: css_path+'metro-bootstrap-responsive.css',
fileOut: css_compile_path+'metro-responsive.min.css',
fileOut: css_compile_path+'metro-bootstrap-responsive.min.css',
callback: function(err, min){
if (err) console.log(err); else console.log("responsive css compiled");
}
11 changes: 6 additions & 5 deletions docs/js/metro.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions docs/js/metro/metro-wizard.js
Original file line number Diff line number Diff line change
@@ -14,11 +14,11 @@
next: true,
finish: true
},
onCancel: function(){},
onHelp: function(){},
onPrior: function(){return true;},
onNext: function(){return true;},
onFinish: function(){}
onCancel: function(page){},
onHelp: function(page){},
onPrior: function(page){return true;},
onNext: function(page){return true;},
onFinish: function(page){}
},

_stepper: undefined,
@@ -61,28 +61,28 @@
var group_right = $("<div/>").addClass("group-right").appendTo(actions);

if (o.buttons.cancel) {
$("<button/>").addClass("btn-cancel").html($.Metro.Locale[o.locale].buttons[2]).appendTo(group_left).on('click', function(){
o.onCancel();
$("<button type='button'/>").addClass("btn-cancel").html($.Metro.Locale[o.locale].buttons[2]).appendTo(group_left).on('click', function(){
o.onCancel(that._currentStep+1);
});
}
if (o.buttons.help) {
$("<button/>").addClass("btn-help").html($.Metro.Locale[o.locale].buttons[3]).appendTo(group_right).on('click', function(){
o.onHelp();
$("<button type='button'/>").addClass("btn-help").html($.Metro.Locale[o.locale].buttons[3]).appendTo(group_right).on('click', function(){
o.onHelp(that._currentStep+1);
});
}
if (o.buttons.prior) {
$("<button/>").addClass("btn-prior").html($.Metro.Locale[o.locale].buttons[4]).appendTo(group_right).on('click', function(){
if (o.onPrior()) that.prior();
$("<button type='button'/>").addClass("btn-prior").html($.Metro.Locale[o.locale].buttons[4]).appendTo(group_right).on('click', function(){
if (o.onPrior(that._currentStep+1)) that.prior();
});
}
if (o.buttons.next) {
$("<button/>").addClass("btn-next").html($.Metro.Locale[o.locale].buttons[5]).appendTo(group_right).on('click', function(){
if (o.onNext()) that.next();
$("<button type='button'/>").addClass("btn-next").html($.Metro.Locale[o.locale].buttons[5]).appendTo(group_right).on('click', function(){
if (o.onNext(that._currentStep+1)) that.next();
});
}
if (o.buttons.finish) {
$("<button disabled/>").addClass("btn-finish").html($.Metro.Locale[o.locale].buttons[6]).appendTo(group_right).on('click', function(){
o.onFinish();
$("<button type='button' disabled/>").addClass("btn-finish").html($.Metro.Locale[o.locale].buttons[6]).appendTo(group_right).on('click', function(){
o.onFinish(that._currentStep+1);
});
}
}
30 changes: 15 additions & 15 deletions js/metro-wizard.js
Original file line number Diff line number Diff line change
@@ -14,11 +14,11 @@
next: true,
finish: true
},
onCancel: function(){},
onHelp: function(){},
onPrior: function(){return true;},
onNext: function(){return true;},
onFinish: function(){}
onCancel: function(page){},
onHelp: function(page){},
onPrior: function(page){return true;},
onNext: function(page){return true;},
onFinish: function(page){}
},

_stepper: undefined,
@@ -61,28 +61,28 @@
var group_right = $("<div/>").addClass("group-right").appendTo(actions);

if (o.buttons.cancel) {
$("<button/>").addClass("btn-cancel").html($.Metro.Locale[o.locale].buttons[2]).appendTo(group_left).on('click', function(){
o.onCancel();
$("<button type='button'/>").addClass("btn-cancel").html($.Metro.Locale[o.locale].buttons[2]).appendTo(group_left).on('click', function(){
o.onCancel(that._currentStep+1);
});
}
if (o.buttons.help) {
$("<button/>").addClass("btn-help").html($.Metro.Locale[o.locale].buttons[3]).appendTo(group_right).on('click', function(){
o.onHelp();
$("<button type='button'/>").addClass("btn-help").html($.Metro.Locale[o.locale].buttons[3]).appendTo(group_right).on('click', function(){
o.onHelp(that._currentStep+1);
});
}
if (o.buttons.prior) {
$("<button/>").addClass("btn-prior").html($.Metro.Locale[o.locale].buttons[4]).appendTo(group_right).on('click', function(){
if (o.onPrior()) that.prior();
$("<button type='button'/>").addClass("btn-prior").html($.Metro.Locale[o.locale].buttons[4]).appendTo(group_right).on('click', function(){
if (o.onPrior(that._currentStep+1)) that.prior();
});
}
if (o.buttons.next) {
$("<button/>").addClass("btn-next").html($.Metro.Locale[o.locale].buttons[5]).appendTo(group_right).on('click', function(){
if (o.onNext()) that.next();
$("<button type='button'/>").addClass("btn-next").html($.Metro.Locale[o.locale].buttons[5]).appendTo(group_right).on('click', function(){
if (o.onNext(that._currentStep+1)) that.next();
});
}
if (o.buttons.finish) {
$("<button disabled/>").addClass("btn-finish").html($.Metro.Locale[o.locale].buttons[6]).appendTo(group_right).on('click', function(){
o.onFinish();
$("<button type='button' disabled/>").addClass("btn-finish").html($.Metro.Locale[o.locale].buttons[6]).appendTo(group_right).on('click', function(){
o.onFinish(that._currentStep+1);
});
}
}
File renamed without changes.
Loading

0 comments on commit bbb336d

Please sign in to comment.