Skip to content

Commit

Permalink
Changed select value as filename
Browse files Browse the repository at this point in the history
  • Loading branch information
popomore committed Mar 19, 2015
1 parent 46b7bd0 commit 2f8325e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scene_toolbox.html
Expand Up @@ -50,16 +50,15 @@
document.domain = qs.domain;
}
var parent = this.top;
var scenes = parent.__koa_mock_scenes || [];
var scenes = parent.__koa_mock_scenes || {};

var select = $('#j-switch-scene');
var queries = parseQueryString(parent.location.search);
var options = '<option value=""></option>';

// create select options
for (var i = 0; i < scenes.length; i++) {
var v = scenes[i];
options += '<option value="' + v + '">' + v + '</option>';
for (var filename in scenes) {
options += '<option value="' + filename + '">' + scenes[filename] + ' (' + filename + ')</option>';
}

select.html(options)
Expand Down

0 comments on commit 2f8325e

Please sign in to comment.