src/common/js/winjs/js/ui.js
function _Overlay_resolveCommands(commands) {
                    // First make sure they're all DOM elements.
                    commands = _resolveElements(commands);

                    // Now make sure they're all in this container
                    var result = {};
                    result.commands = [];
                    result.others = [];
                    var allCommands = this.element.querySelectorAll(".win-command");
                    var countAll, countIn;
                    for (countAll = 0; countAll < allCommands.length; countAll++) {
                        var found = false;
                        for (countIn = 0; countIn < commands.length; countIn++) {
                            if (commands[countIn] === allCommands[countAll]) {
                                result.commands.push(allCommands[countAll]);
                                commands.splice(countIn, 1);
                                found = true;
                                break;
                            }
                        }
                        if (!found) {
                            result.others.push(allCommands[countAll]);
                        }
                    }
                    return result;
                }
function _Overlay_resolveCommands(commands) {
                    // First make sure they're all DOM elements.
                    commands = _resolveElements(commands);

                    // Now make sure they're all in this container
                    var result = {};
                    result.commands = [];
                    result.others = [];
                    var allCommands = this.element.querySelectorAll(".win-command");
                    var countAll, countIn;
                    for (countAll = 0; countAll < allCommands.length; countAll++) {
                        var found = false;
                        for (countIn = 0; countIn < commands.length; countIn++) {
                            if (commands[countIn] === allCommands[countAll]) {
                                result.commands.push(allCommands[countAll]);
                                commands.splice(countIn, 1);
                                found = true;
                                break;
                            }
                        }
                        if (!found) {
                            result.others.push(allCommands[countAll]);
                        }
                    }
                    return result;
                }
function _Overlay_resolveCommands ( commands ) { // First make sure they're all DOM elements. commands = _resolveElements ( commands ) ; // Now make sure they're all in this container var result = { } ; result . commands = [ ] ; result . others = [ ] ; var allCommands = this . element . querySelectorAll ( ".win-command" ) ; var countAll , countIn ; for ( countAll = 0 ; countAll < allCommands . length ; countAll ++ ) { var found = false ; for ( countIn = 0 ; countIn < commands . length ; countIn ++ ) { if ( commands [ countIn ] === allCommands [ countAll ] ) { result . commands . push ( allCommands [ countAll ] ) ; commands . splice ( countIn , 1 ) ; found = true ; break ; } } if ( ! found ) { result . others . push ( allCommands [ countAll ] ) ; } } return result ; }
Resolves our commands
Resolves our commands