mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Add definition for "acc-wizard".
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
/// <reference path="acc-wizard.d.ts" />
|
||||
|
||||
/**
|
||||
* @summary Test for "accwizard" without options.
|
||||
*/
|
||||
function testBasic() {
|
||||
$('#test').accwizard();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for "accwizard" with options.
|
||||
*/
|
||||
function testBasic() {
|
||||
var options: AccWizardOptions = {
|
||||
addButtons: true,
|
||||
sidebar: '.acc-wizard-sidebar',
|
||||
activeClass: 'acc-wizard-active',
|
||||
completedClass: 'acc-wizard-completed',
|
||||
todoClass: 'acc-wizard-todo',
|
||||
stepClass: 'acc-wizard-step',
|
||||
nextText: 'Next Step',
|
||||
backText: 'Go Back',
|
||||
nextType: 'submit',
|
||||
backType: 'reset',
|
||||
nextClasses: 'btn btn-primary',
|
||||
backClasses: 'btn',
|
||||
autoScrolling: true,
|
||||
onNext: function() {},
|
||||
onBack: function() {},
|
||||
onInit: function() {},
|
||||
onDestroy: function() {}
|
||||
};
|
||||
|
||||
$('#test').accwizard(options);
|
||||
}
|
||||
Vendored
+101
@@ -0,0 +1,101 @@
|
||||
// Type definitions for acc-wizard
|
||||
// Project: https://github.com/sathomas/acc-wizard
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface AccWizardOptions {
|
||||
/**
|
||||
* @summary Add next/prev buttons to panels.
|
||||
* @type {boolean}
|
||||
*/
|
||||
addButtons: boolean;
|
||||
|
||||
/**
|
||||
* @summary Selector for task sidebar.
|
||||
* @type {string}
|
||||
*/
|
||||
sidebar: string;
|
||||
|
||||
/**
|
||||
* @summary Class to indicate the active task in sidebar.
|
||||
* @type {string}
|
||||
*/
|
||||
activeClass: string;
|
||||
|
||||
/**
|
||||
* @summary Class to indicate task is complete.
|
||||
* @type {string}
|
||||
*/
|
||||
completedClass: string;
|
||||
|
||||
/**
|
||||
* @summary Class to indicate task is still pending.
|
||||
* @type {string}
|
||||
*/
|
||||
todoClass: string;
|
||||
|
||||
/**
|
||||
* @summary Class for step buttons within panels.
|
||||
* @type {string}
|
||||
*/
|
||||
stepClass: string;
|
||||
|
||||
/**
|
||||
* @summary Text for next button.
|
||||
* @type {string}
|
||||
*/
|
||||
nextText: string;
|
||||
|
||||
/**
|
||||
* @summary Text for back button
|
||||
* @type {string}
|
||||
*/
|
||||
backType: string;
|
||||
|
||||
/**
|
||||
* @summary Class(es) for next button.
|
||||
* @type {string}
|
||||
*/
|
||||
nextClasses: string;
|
||||
|
||||
/**
|
||||
* @summary Class(es) for back button.
|
||||
* @type {string}
|
||||
*/
|
||||
backClasses: string;
|
||||
|
||||
/**
|
||||
* @summary Auto-scrolling.
|
||||
* @type {boolean}
|
||||
*/
|
||||
autoScrolling: boolean;
|
||||
|
||||
/**
|
||||
* @summary Function to call on next step.
|
||||
*/
|
||||
onNext: Function;
|
||||
|
||||
/**
|
||||
* @summary Function to call on back up.
|
||||
*/
|
||||
onBack: Function;
|
||||
|
||||
/**
|
||||
* @summary A chance to hook initialization.
|
||||
*/
|
||||
onInit: Function;
|
||||
|
||||
/**
|
||||
* @summary A chance to hook destruction.
|
||||
*/
|
||||
onDestroy: Function;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Interface for "acc-wizard" JQuery plugin.
|
||||
* @author Cyril Schumacher
|
||||
* @version 1.0
|
||||
*/
|
||||
interface JQueryStatic {
|
||||
accwizard(options: AccWizardOptions): void;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--noImplicitAny
|
||||
Reference in New Issue
Block a user