//#region Priority
function PriorityItemData(observer) {
    var args = [];
    args.push(observer);
    args.push({
        group: 'priority',
        name: 'priorityid',
        selector: '[name="priorityidselector"]'
    });
    ItemData.apply(this, args);
}
PriorityItemData.prototype = Object.create(ItemData.prototype);
PriorityItemData.prototype.GetSubmitVal = function (submitData) {
    return submitData.Id;
}
PriorityItemData.prototype.GetSelectorType = function () {
    return 'select';
}
PriorityItemData.prototype.ConflictDialogContent = function (selectorType, submitData) {
    var that = this;

    return $(
            '<div>\
                <label>\
                    <input type="radio" name="conflictradioresolve-' + that._options.name + '" value="1" checked />' + TaskFormHubResources.ConflictDialogContent_UseOldValue + '\
                </label>\
                <select class="px300" name="conflictradioresolve-' + that._options.name + '-value1">\
                    <option value="' + that.GetCurrentVal() + '">' + $(that._options.selector).find('option:selected').text() + '</option>\
                </select>\
            </div><hr>\
            <div>\
                <label>\
                    <input type="radio" name="conflictradioresolve-' + that._options.name + '" value="0" />' + TaskFormHubResources.ConflictDialogContent_UseNewValue + '\
                </label>\
                <select class="px300" name="conflictradioresolve-' + that._options.name + '-value0">\
                    <option value="' + submitData.Id + '">' + submitData.Name + '</option>\
                </select>\
            </div>\
            ');
}
//обновить блок
PriorityItemData.prototype.AppendNotConflictUpdate = function (submitData) {
    if ($(this._options.selector).find('option[value="' + submitData.Id + '"]').length == 0) {
        $(this._options.selector).append('<option value="' + submitData.Id + '">' + submitData.Name + '</option>')
    }
    $(this._options.selector).val(submitData.Id).trigger('change');
    this.SetOldValue();
    this.SendBlockChange();
}
//#endregion