



<div class="create_all">
    <div class="title_btn">


        <div class="grid_title">
            <div class="grid_title1 fl">
            </div>
            <div class="title_con fl">
                <h2> {{title}} <span style="color:#cc9933;" ng-show="!editable"> - 无权限编辑</span></h2>
            </div>
            <div class="grid_title2 fl">
            </div>
        </div>
        <div class="btn_01" style="float:right;">


            <ul id="editConfig" style="position:absolute;z-index:2;">
                <li ng-repeat="element in editConfigElements">
                    <input type='checkbox' class='oec' id='__oe{{element.item.ID}}' ng-checked="element.select" />  {{element.item.pName}}
                </li>
            </ul>
            <input type="button" value="设置" id="editConfigButton" ng-click="editConfig();" />


            <a class="fs14" href="javascript:void(0);" id="submitEdit" ng-show="editable" ng-click="doSubmit();"> 提 交 </a>     <a class="fs14" href="javascript:void(0);" ng-click="closeDialog();" id="close"> 关 闭 </a>
        </div>

    </div>


    <div class="grid_24 clearfix">


        <div id="CreateWindow_main" name="CreateWindow_main" class="createTable clearfix" cellpadding="3" cellspacing="3">


            <dl id="crv">
                <dd ng-repeat="element in elements" class="dd_{{element.p.pTypeId}}">
                    <div ng-if="(element.p.pTypeId == 5||element.p.pTypeId == 3||element.p.pTypeId == 4) && element.p.categoryId == categoryId">
                        <span>{{element.p.pName}}: </span>
                        <input ng-blur="checkValid(element.p);" tag='edit' type='text' id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' unq="{{element.p.isUnique}}" req="{{element.p.required}}" vad='{{element.p.validator}}' ng-model="element.v" />
                        <i ng-show="element.p.required"> R  </i> <i ng-show="element.p.isUnique"> U </i>
                    </div>


                    <div ng-if="(element.p.pTypeId == 5||element.p.pTypeId == 3||element.p.pTypeId == 4) && element.p.categoryId != categoryId">
                        <span>{{element.p.pName}}: </span>
                        <input type="text" name="view__j{{element.p.ID}}" id='view__j{{element.p.ID}}' ng-model="element.v" /><input tag="edit" type="hidden" name="__j{{element.p.ID}}" id="__j{{element.p.ID}}" />
                        <a style="color:blue" href="javascript:void(0);" ng-click="openSelect(element.p);">选择</a>
                    </div>


                    <div ng-if="element.p.pTypeId == 2">
                        <span>{{element.p.pName}}: </span>    <select id='__c{{element.p.ID}}' name='__c{{element.p.ID}}'  tag="edit" >
                                                                 <option ng-repeat="obj in element.s" value="{{obj.value}}"  ng-selected="element.v==obj.value"> {{obj.label}} </option>   </select>
                    </div>

                    <div ng-if="element.p.pTypeId == 12">
                        <span>{{element.p.pName}}: </span>    <select id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' tag="edit">
                            <option ng-repeat="obj in element.s" value="{{obj.value}}" ng-selected="element.v.UserId==obj.value"> {{obj.label}} </option>
                        </select>
                    </div>


                    <div ng-if="element.p.pTypeId == 19">
                        <span>{{element.p.pName}}: </span>    <select multiselectdropdown tag="edit" multiple="multiple" type="user" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' val="{{element.v}}"></select>
                    </div>

                    <div ng-if="element.p.pTypeId == 20">
                        <span>{{element.p.pName}}: </span>    <select multiselectdropdown tag="edit" multiple="multiple" type="data" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' val="{{element.v}}"></select>
                    </div>

                    <div ng-if="element.p.pTypeId == 1||element.p.pTypeId == 21">
                        <span>{{element.p.pName}}: </span>    <input type="checkbox" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' tag="edit" ng-model="element.v" />
                    </div>

                    <div ng-if="element.p.pTypeId == 6">
                        <span>{{element.p.pName}}: </span>    <input datepick class="date-pick" type="text" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' tag="edit" ng-model="element.v" />
                    </div>

                    <div ng-if="element.p.pTypeId == 7" >
                        <span>{{element.p.pName}}: </span>    <textarea editor tag='edit' id='__c{{element.p.ID}}' name='__c{{element.p.ID}}'  class='jqtxt' ng-model="element.v"></textarea>
                    </div>

                    <div ng-if="element.p.pTypeId == 16">
                        <span>{{element.p.pName}}: </span>     {{element.v}} <input type="hidden" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' value="{{element.v}}" /></div>


                    <div ng-if="element.p.pTypeId == 11">
                        <span>{{element.p.pName}}: </span>    <div attachment ng-model="element" id='__img{{element.p.ID}}' class='holder'><ul>
                        <li tag='{{element.v.ID}}' ng-show="element.v.FilePath"><img ng-src='{{element.v.FilePath}}' width='100px' /><span>  </span><br /><a href='javascript:void(0);' class="del" pat="{{element.p.ID}}" att="{{element.v.ID}}" cat="{{categoryId}}"  >删除 </a></li></ul></div>
                        <button ng-click="fileSelect(element.p.ID)">上传文件</button>
                        <input type="file" style="display:none"
                               id="file_{{element.p.ID}}" name='file_{{element.p.ID}}' onchange="angular.element(this).scope().fileNameChanged(this)" />                      
                        <input type='hidden' id='__c{{element.p.ID}}' name="__c{{element.p.ID}}" tag="edit" value="{{element.v.ID}}" />
                    </div>

                    <div ng-if="element.p.pTypeId == 10">
                        <span>{{element.p.pName}}: </span>    <div attachments ng-model="element" id='__img{{element.p.ID}}' class='holder  w800'>
    <ul>
        <li ng-repeat="att in element.v" tag='{{att.ID}}' ng-show="att.FilePath">

        <div ng-if="att.isImage">
            <img ng-src='{{att.FilePath}}' width='100px' />
        </div>

        <div ng-if="!att.isImage">
            <a target="_blank" ng-href="{{att.FilePath}}">{{att.Filename}}</a>
         </div>
        
        
        <span>  </span><br /><a href='javascript:void(0);' class="del" pat="{{element.p.ID}}" att="{{att.ID}}" cat="{{categoryId}}">删除 </a></li>
    </ul>
</div>
                        <button ng-click="fileSelect(element.p.ID)">上传文件</button>
                        <input type="file" style="display:none" multiple
                               id="file_{{element.p.ID}}" name='file_{{element.p.ID}}' onchange="angular.element(this).scope().fileNameChanged2(this)" />     
                        
                         <input type='hidden' id='__c{{element.p.ID}}' name="__c{{element.p.ID}}" value="{{element.v}}" />
                    </div>


                </dd>


            </dl>

        </div>
    </div>
</div>
