forked from zealotrunner/fancy-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Frank Kohlhepp
committed
May 19, 2011
1 parent
5ba3094
commit dfc3da3
Showing
5 changed files
with
33 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,42 @@ | ||
window.addEvent("domready", function () { | ||
// Option 1: Use the manifest: | ||
/* | ||
new FancySettings.initWithManifest("manifest.json", function (settings) { | ||
settings.manifestOutput.button1.addEvent("action", function () { | ||
alert("hello, here i am"); | ||
}); | ||
}); | ||
*/ | ||
|
||
/* | ||
var f = new FancySettings("TEST", "icon.png"); | ||
f.create({ | ||
"name": "test", | ||
"type": "text", | ||
"tab": "Tab 1", | ||
"group": "Group 1", | ||
"text": "Drück mich sanft", | ||
"label": "Hier:" | ||
// Option 2: Do everything manually: | ||
var settings = new FancySettings("My Extension", "icon.png"); | ||
|
||
var checkbox1 = settings.create({ | ||
"tab": "tabName", | ||
"group": "groupName", | ||
"type": "checkbox", | ||
"name": "checkbox1", | ||
"label": "Enable this" | ||
}); | ||
f.create({ | ||
|
||
settings.create({ | ||
"tab": "tabName", | ||
"group": "groupName", | ||
"type": "button", | ||
"label": "Press me softly:", | ||
"text": "Right Here" | ||
}); | ||
|
||
settings.create({ | ||
"tab": "Tab 2", | ||
"group": "Group 2", | ||
"text": "mich auch" | ||
"group": "Some Grop", | ||
"type": "text", | ||
"masked": true, | ||
"text": "6 - 12 characters", | ||
"label": "Enter password:" | ||
}); | ||
|
||
// Option 2: Do everything manually: | ||
// --------------------------------- | ||
// var settings = new FancySettings("My Extension"); | ||
// | ||
// var checkbox1 = settings.create("tabName", "groupName", "checkbox", { | ||
// "name": "checkbox1", | ||
// "label": "Enable this" | ||
// }); | ||
// | ||
// checkbox1.addEvent("action", function (value) { | ||
// alert("you toggled me: " + value); | ||
// });*/ | ||
checkbox1.addEvent("action", function (value) { | ||
alert("you toggled me: " + value); | ||
}); | ||
}); |