<commit_before>/*
 * The MIT License - http://www.opensource.org/licenses/mit-license
 * Copyright (c) 2016 <NAME>.
 */

/*global WorldWind*/

define(['knockout', 'jquery', 'jqueryui'],
    function (ko, $) {
        "use strict";
        /**
         * @constructor
         * @param {String} viewFragment HTML
         * @returns {TacticalSymbolEditor}
         */
        function TacticalSymbolEditor(viewFragment) {
            var self = this;

            // Load the view fragment into the DOM's body.
            // Wrap the view in a hidden div for use in a JQuery UI dialog.
            var $view = $('<div style="display: none"></div>')
                .append(viewFragment)
                .appendTo($('body'));
            this.view = $view.children().first().get(0);

            this.symbol = ko.observable({});

            this.open = function (symbol) {
                console.log("Open Symbol: " + symbol.name());

                // Update observable(s)
                self.symbol(symbol);

                // Open the dialog
                var $symbolEditor = $(self.view);
                $symbolEditor.dialog({
                    autoOpen: false,
                    title: "Edit Symbol"
                });
                $symbolEditor.dialog("open");
            };

            // Binds the view to this view model.
            ko.applyBindings(this, this.view);

        }

        return TacticalSymbolEditor;
    }
);<commit_msg>Added dependency on milsymbol library.<commit_after>/*
 * The MIT License - http://www.opensource.org/licenses/mit-license
 * Copyright (c) 2016 <NAME>.
 */

/*global WorldWind*/

define(['milsymbol','knockout', 'jquery', 'jqueryui'],
    function (ms, ko, $) {
        "use strict";
        /**
         * @constructor
         * @param {String} viewFragment HTML
         * @returns {TacticalSymbolEditor}
         */
        function TacticalSymbolEditor(viewFragment) {
            var self = this;

            // Load the view fragment into the DOM's body.
            // Wrap the view in a hidden div for use in a JQuery UI dialog.
            var $view = $('<div style="display: none"></div>')
                .append(viewFragment)
                .appendTo($('body'));
            this.view = $view.children().first().get(0);

            this.symbol = ko.observable({});

            this.open = function (symbol) {
                console.log("Open Symbol: " + symbol.name());

                // Update observable(s)
                self.symbol(symbol);

                // Open the dialog
                var $symbolEditor = $(self.view);
                $symbolEditor.dialog({
                    autoOpen: false,
                    title: "Edit Symbol"
                });
                $symbolEditor.dialog("open");
            };

            // Binds the view to this view model.
            ko.applyBindings(this, this.view);

        }

        return TacticalSymbolEditor;
    }
);
{'fraction_non_alphanumeric': 0.1303469181542607, 'fraction_numerical': 0.003368137420006736, 'mean_word_length': 1.5063291139240507, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5617656', 'n_tokens_mistral': 810, 'n_tokens_neox': 753, 'n_words': 197}