Last change
on this file since 146 was
146,
checked in by fpvanagthoven, 13 years ago
|
Merged step/displaystep class functionality, division is unnecessary.
Added some javascript to manipulate editor objects in sequencerScripts.js
|
File size:
1.1 KB
|
Rev | Line | |
---|
[146] | 1 | /* |
---|
| 2 | * To change this template, choose Tools | Templates |
---|
| 3 | * and open the template in the editor. |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | function IsItemSelected(check, target) { |
---|
| 7 | if (check.value) { |
---|
| 8 | target.disabled = false; |
---|
| 9 | } |
---|
| 10 | else { |
---|
| 11 | target.disabled = true; |
---|
| 12 | } |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | function IsCheckEnabled(check, target) { |
---|
| 16 | if (check.checked) { |
---|
| 17 | target.disabled = false; |
---|
| 18 | this.removeClass(target, "dis"); |
---|
| 19 | |
---|
| 20 | } |
---|
| 21 | else { |
---|
| 22 | target.disabled = true; |
---|
| 23 | this.addClass(target, "dis"); |
---|
| 24 | } |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | function SubmitToolbox() { |
---|
| 28 | document.forms['toolbox'].submit(); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | /* |
---|
| 34 | * Selection code |
---|
| 35 | * |
---|
| 36 | */ |
---|
| 37 | |
---|
| 38 | function checkSelectedStep(number){ |
---|
| 39 | document.sequencer.selectedStep.value = number; |
---|
| 40 | document.refresh(); |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | function highlightSelectedStep() { |
---|
| 44 | |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | // Class manipulation |
---|
| 57 | |
---|
| 58 | function hasClass(ele,cls) { |
---|
| 59 | return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | function addClass(ele,cls) { |
---|
| 63 | if (!this.hasClass(ele,cls)) ele.className += " "+cls; |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | function removeClass(ele,cls) { |
---|
| 67 | if (hasClass(ele,cls)) { |
---|
| 68 | var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); |
---|
| 69 | ele.className=ele.className.replace(reg,' '); |
---|
| 70 | } |
---|
| 71 | } |
---|
| 72 | |
---|
Note: See
TracBrowser
for help on using the repository browser.