</td>
          <?php 
if (in_array($action, array('edit'))) {
    ?>
          <td class="col-md-5">
            <button type="button" class="btn btn-default btn-primary" role="button" onclick="ajaxFormSubmit('storeUpload')">保存凭证</button>
          </td>
          <?php 
}
?>
        </tr>
      </tbody>
    </table>
  <?php 
if (in_array($action, array('edit'))) {
    ?>
  </form>
  <?php 
}
?>
</div>
<?php 
if (in_array($action, array('edit'))) {
    initUploadButtons(array('settleUpload'), printUrl('Upload', 'uploadSave', array('dir' => 'settleFile')), 'imgFile');
}
?>
<script type="text/javascript">
  $(function () {
    $('[data-toggle="tooltip"]').tooltip();
  })
</script>
  mediaTypeAliasDisplay(<?php 
echo $projectData['mediaType'] ? $projectData['mediaType'] : 0;
?>
);
  $("#mediaType").change(function(){
    mediaTypeAliasDisplay($("#mediaType").val());
    initValidation();
  });
});
//初始化验证
function initValidation(){
	$('form[name="add"]').find("input,select,textarea").jqBootstrapValidation("destroy");
	$('form[name="add"]').find("input,select,textarea").not("[type=submit]").jqBootstrapValidation({
	    preventSubmit:false,
	    submitSuccess: function (form, event) {
	         event.preventDefault();
	         ajaxFormSubmit('add');
	     },
	     submitError: function (form, event, errors) {
	       event.preventDefault();
	       }
  	});
}
</script>
<?php 
if (in_array($action, array('edit'))) {
    initUploadButtons(array('contractFile', 'invoiceFile'), printUrl('Upload', 'uploadSave', array('dir' => 'settleFile')), 'imgFile');
    $auditTableIds = array('auditTable0', 'auditTable1', 'auditTable2');
    initUploadButtons($auditTableIds, printUrl('Upload', 'uploadSave', array('dir' => 'image')), 'imgFile');
}
$this->load->view('common/foot');
示例#3
0
        <td class="text-center"><?php 
echo $netData['settleAuditStr'];
?>
</td>
      </tr>
      <tr>
        <td class="text-center" colspan="8">
          <button type="submit" class="btn btn-default btn-primary" role="button">提交</button>
          <button type="button" class="btn btn-default btn-primary" role="button" onclick="closeWindow()">关闭</button>
        </td>
      </tr>
    </tbody>
  </table>
</form>
<?php 
initUploadButtons($netButtonIds, printUrl('Upload', 'uploadSave', array('dir' => 'image')), 'imgFile');
?>
<script type="text/javascript">
$(function(){
  initValidation();
});
  //初始化验证
function initValidation(){
  $('form[name="settleSubmit"]').find("input,select,textarea").jqBootstrapValidation("destroy");
  $('form[name="settleSubmit"]').find("input,select,textarea").not("[type=submit]").jqBootstrapValidation({
      preventSubmit:false,
      submitSuccess: function (form, event) {
           event.preventDefault();
           ajaxFormSubmit('settleSubmit');
       },
       submitError: function (form, event, errors) {
示例#4
0
    <li>
      <a href="#" aria-label="Next">
        <span aria-hidden="true">&raquo;</span>
      </a>
    </li>
  </ul>
</nav>
<div class="row">
  <div class="col-xs-6 col-md-3">
    <a href="#" class="thumbnail">
      <img src="http://d.ifengimg.com/mw950_/y2.ifengimg.com/cmpp/2015/05/22/15/e370a8c8-b865-4500-98db-13930487e1fc_size150_w1000_h666.jpg" alt="...">
    </a>
  </div>
</div>
<span class="glyphicon glyphicon-save btn-lg" aria-hidden="true"></span>
<input type="button" name="test" id="test" value="测试" onclick="ajaxConfirmSubmit('确定删除?','index.php?c=Main&m=ajax')" />
		<div class="upload">
			<input class="ke-input-text" type="text" id="uploadButton1Url" value="" readonly="readonly" /> <input type="button" id="uploadButton1" value="上传" />
			<input class="ke-input-text" type="text" id="uploadButton2Url" value="" readonly="readonly" /> <input type="button" id="uploadButton2" value="上传" />
			<input class="ke-input-text" type="text" id="uploadButton3Url" value="" readonly="readonly" /> <input type="button" id="uploadButton3" value="上传" />
		</div>
		<p><input type="text" id="image1Value" value="" /> <input type="button" id="image1" value="选择图片" />(网络图片 + 本地上传)</p>
		<p><input type="text" id="image2Value" value="" /> <input type="button" id="image2" value="选择图片" />(网络图片)</p>
		<p><input type="text" id="image3Value" value="" /> <input type="button" id="image3" value="选择图片" />(本地上传)</p>
<?php 
initUploadButtons(array('uploadButton1', 'uploadButton2', 'uploadButton3'), 'index.php?c=Upload&m=uploadSave', 'imgFile');
initUploadImage(array('image1'), 'index.php?c=Upload&m=uploadSave', 'local');
?>

<?php 
$this->load->view('common/foot');