Navigation Menu

Skip to content

Commit

Permalink
tweaking the debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-fielding committed Sep 13, 2013
1 parent e5f0507 commit ff88b98
Show file tree
Hide file tree
Showing 24 changed files with 38 additions and 10 deletions.
Empty file modified .bowerrc 100644 → 100755
Empty file.
Empty file modified .gitignore 100644 → 100755
Empty file.
Empty file modified .travis.yml 100644 → 100755
Empty file.
Empty file modified CNAME 100644 → 100755
Empty file.
Empty file modified Gruntfile.js 100644 → 100755
Empty file.
Empty file modified README.md 100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions bookmarklet/debugger.css 100644 → 100755
Expand Up @@ -93,22 +93,22 @@ body{
display: none!important;
}

#rd_states ul{
.rd_DebugPanel ul{
margin: 0px;
}

#rd_states ul li{
.rd_DebugPanel ul li{
list-style: none;
}

#rd_states h2{
.rd_DebugPanel h2{
background: #ccc;
margin-top: 0px;
padding: 5px 10px;
font-size: 16px;
line-height: 16px;
}

#rd_states p{
.rd_DebugPanel p{
margin: 10px;
}
12 changes: 9 additions & 3 deletions bookmarklet/debugger.js 100644 → 100755
Expand Up @@ -96,12 +96,18 @@

var initPanels = {
overview: function(){
var panel = document.getElementById('rd_overview'),
ssmStates = ssm.getStates(),
stateCount = ssmStates.length,
panelHTML = "<ul>";

panelHTML += "<p>Number of SSM States: " + stateCount + "</p>";
panel.innerHTML = panelHTML;
},
ssmStates: function(){
var ssmStates = ssm.getStates(),
var panel = document.getElementById('rd_states'),
ssmStates = ssm.getStates(),
stateCount = ssmStates.length,
panel = document.getElementById('rd_states'),
panelHTML = '<ul>';

for (var i = 0; i < stateCount; i++) {
Expand All @@ -117,7 +123,7 @@

panelHTML += '</ul>'

document.getElementById('rd_states').innerHTML = panelHTML;
document.getElementById('rd_states').innerHTML += panelHTML;
}
};

Expand Down
Empty file modified bookmarklet/images/close.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bookmarklet/templates.js 100644 → 100755
Empty file.
5 changes: 4 additions & 1 deletion bower.json 100644 → 100755
Expand Up @@ -8,6 +8,9 @@
"components"
],
"dependencies": {
"sass-bootstrap": "~2.3.2"
"sass-bootstrap": "~2.3.2",
"jquery": "~1.10.2",
"modernizr": "~2.6.2",
"respond": "~1.3.0"
}
}
4 changes: 2 additions & 2 deletions dist/ssm.min.js 100644 → 100755

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

Empty file modified docs/css/main.css 100644 → 100755
Empty file.
Empty file modified docs/css/styles.css 100644 → 100755
Empty file.
Empty file modified docs/images/fork-me.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/images/ssm-logo.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/js/script.js 100644 → 100755
Empty file.
Empty file modified docs/sass/styles.scss 100644 → 100755
Empty file.
8 changes: 8 additions & 0 deletions index.html 100644 → 100755
Expand Up @@ -5,6 +5,10 @@
<link rel="stylesheet" href="docs/css/styles.css">
<link href='http://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>

<script src="docs/bower_components/modernizr/modernizr.js"></script>
<script src="docs/bower_components/respond/respond.min.js"></script>

</head>
<body data-spy="scroll" data-target=".navbar" id="home">
<a class="github-ribbon visible-desktop" href="https://github.com/jonathan-fielding/SimpleStateManager">
Expand Down Expand Up @@ -178,6 +182,10 @@ <h3>Full API</h3>
<td>ssm.addState</td>
<td>Add a new state, expects an object literal, properties avaliable - id (optional), minWidth (optional), maxWidth (optional), onEnter (optional), onResize (optional), onLeave (optional)</td>
</tr>
<tr>
<td>ssm.updateState</td>
<td>Update an existing state, expects two parameters, firstly the id of the state you wish to update and secondly an object literal of updated settings, properties avaliable - id (optional), minWidth (optional), maxWidth (optional), onEnter (optional), onResize (optional), onLeave (optional)</td>
</tr>
<tr>
<td>ssm.addStates</td>
<td>Add multiple new states, expects an array of object literals, properties avaliable - id (optional), minWidth (optional), maxWidth (optional), onEnter (optional), onResize (optional), onLeave (optional)</td>
Expand Down
Empty file modified package.json 100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions src/ssm.js 100644 → 100755
Expand Up @@ -73,6 +73,17 @@
return this;
};

//Allow updating of an already added state
ssm.updateState = function (stateId, options) {
for (var i = states.length - 1; i >= 0; i--) {
if (states[i].id === stateId) {
states[i] = mergeOptions(states[i], options);
}
}

return this;
};

//Find and remove the state from the array
ssm.removeState = function (stateId) {
for (var i = states.length - 1; i >= 0; i--) {
Expand Down
Empty file modified test/index.html 100644 → 100755
Empty file.
Empty file modified test/resources/qunit.css 100644 → 100755
Empty file.
Empty file modified test/resources/qunit.js 100644 → 100755
Empty file.

0 comments on commit ff88b98

Please sign in to comment.