activity_launch.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. <style>
  2. body{
  3. font-family: "Microsoft Yahei", "微软雅黑";
  4. box-sizing: border-box;
  5. }
  6. .clearfix {
  7. clear: both;
  8. }
  9. .content-header{
  10. padding-left: 22px;
  11. }
  12. .content .box-show{
  13. position: relative;
  14. margin-top: 4px;
  15. padding-left: 22px;
  16. border-radius: 3px;
  17. background: #ffffff;
  18. margin-bottom: 20px;
  19. width: 100%;
  20. height: 1700px;
  21. border: 1px solid #dcdcdc;
  22. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  23. }
  24. .content-setting{
  25. margin-top: 24px;
  26. }
  27. .content-setting .form-group{
  28. margin-bottom: 14px;
  29. height: 30px;
  30. line-height: 30px;
  31. }
  32. .content-setting .form-group label{
  33. margin: 0 22px 0 14px;
  34. font-family: 'SimHei'!important;
  35. width: 60px;
  36. font-size: 14px;
  37. font-weight: normal;
  38. color: #8da8b8;
  39. }
  40. .content-setting .form-group input{
  41. margin-right: 15px;
  42. width: 435px;
  43. height: 30px;
  44. font-size: 14px;
  45. color: #323232;
  46. border-radius: 0;
  47. }
  48. /*活动发起*/
  49. .content-setting .form-group .active-time{
  50. overflow: hidden;
  51. }
  52. .content-setting .form-group .active-time input.date-choose{
  53. width: 200px;
  54. height: 30px;
  55. font-size: 14px;
  56. color: #323232;
  57. border-radius: 0;
  58. }
  59. .content-setting .form-group .active-time span{
  60. margin: 0 10px 0 -5px;
  61. font-size: 14px;
  62. color: #323232;
  63. }
  64. .content-setting .form-group .prise{
  65. }
  66. .content-setting .form-group .prise .prise-detail{
  67. position: relative ;
  68. margin-bottom: 14px;
  69. width: 435px;
  70. height: 30px;
  71. }
  72. .content-setting .form-group .prise .prise-detail .award{
  73. padding-left: 43px;
  74. width: 435px;
  75. height: 30px;
  76. border: 1px solid #dcdcdc;
  77. }
  78. .content-setting .form-group .prise .prise-detail span{
  79. position: absolute;
  80. top: 1px;
  81. left: 1px;
  82. width:28px;
  83. height: 28px;
  84. line-height: 28px;
  85. text-align: center;
  86. font-size: 14px;
  87. color: #323232;
  88. background: #eeeeee;
  89. }
  90. .content-setting .form-group .prise .prise-detail a{
  91. position: absolute;
  92. top: 0;
  93. right: -43px;
  94. font-size: 14px;
  95. font-family: 'SimHei'!important;
  96. color: #1b71c9;
  97. }
  98. .content-setting .form-group .prise .award-detail{
  99. margin-bottom: 14px;
  100. height: 30px;
  101. line-height: 30px;
  102. }
  103. .content-setting .form-group .prise .award-detail span{
  104. width: 60px;
  105. margin-right: 20px;
  106. font-size: 14px;
  107. color: #969696;
  108. }
  109. .content-setting .form-group .prise .award-detail input{
  110. width: 230px;
  111. height: 30px;
  112. }
  113. .content-setting .form-group .prise .award-detail select{
  114. width: 230px;
  115. height: 30px;
  116. border-radius: 0;
  117. padding: 0 12px;
  118. }
  119. .content-setting .form-group .prise .award-detail .edit-template{
  120. margin-left: 20px;
  121. width: 84px;
  122. height: 28px;
  123. line-height: 28px;
  124. font-family: 'SimHei'!important;
  125. font-size: 14px;
  126. text-align: center;
  127. color: #fff;
  128. background: #3c8dbc;
  129. border-radius: 3px;
  130. cursor: pointer ;
  131. }
  132. .content-setting .form-group .prise .uploadImg {
  133. position: relative;
  134. margin: 20px 0 36px 0;
  135. width: 90px;
  136. height: 28px;
  137. line-height: 28px;
  138. text-align: center;
  139. font-size: 14px;
  140. color: #6d6d6d;
  141. background: -webkit-linear-gradient(top, #fff 0%,#dadada 100%);
  142. background: -o-linear-gradient(top, #fff 0%,#dadada 100%);
  143. background: -ms-linear-gradient(top, #fff 0%,#dadada 100%);
  144. background: linear-gradient(to bottom, #fff 0%,#dadada 100%);
  145. border: 1px solid #dcdcdc;
  146. border-radius: 3px;
  147. }
  148. .content-setting .form-group .prise .uploadImg input{
  149. position: absolute;
  150. top: 0;
  151. left: 0;
  152. opacity: 0;
  153. width: 100%;
  154. height: 100%;
  155. outline: none;
  156. }
  157. .content-setting .form-group .prise .add-price{
  158. margin: -16px 0 36px 0;
  159. font-family: 'SimHei'!important;
  160. font-size: 14px;
  161. color: #1b71c9;
  162. cursor: pointer;
  163. }
  164. .content-setting .form-group .project .activity-project span{
  165. display: inline-block;
  166. margin-right: 18px;
  167. padding: 0 14px;
  168. height: 30px;
  169. line-height: 30px;
  170. font-size: 14px;
  171. color: #323232;
  172. background: #ebf1f4;
  173. border-radius: 3px;
  174. }
  175. .content-setting .form-group .project .add-project{
  176. margin: 22px 0 44px 0;
  177. font-family: 'SimHei'!important;
  178. font-size: 14px;
  179. color: #1b71c9;
  180. cursor: pointer;
  181. }
  182. .content-setting .form-group .project .button a{
  183. display: inline-block ;
  184. width: 140px;
  185. height: 34px;
  186. line-height: 34px;
  187. text-align: center;
  188. font-size: 16px;
  189. font-family: 'SimHei'!important;
  190. border-radius: 3px;
  191. }
  192. .content-setting .form-group .project .button a.launch {
  193. color: #fff;
  194. background: #3c8dbc;
  195. }
  196. .content-setting .form-group .project .button a.draft {
  197. margin: 0 30px 0 26px;
  198. color: #787878;
  199. background: #fff;
  200. border: 1px solid #dcdcdc;
  201. }
  202. .content-setting .form-group .project .button span.clear{
  203. font-family: 'SimHei'!important;
  204. font-size: 14px;
  205. color: #323232;
  206. cursor: pointer;
  207. }
  208. .introduce {
  209. margin-bottom: 22px;
  210. width: 780px;
  211. height: 380px;
  212. }
  213. .introduce .intro-header {
  214. /*position: relative;*/
  215. width: 100%;
  216. height: 54px;
  217. line-height: 54px;
  218. background: -webkit-linear-gradient(top, #fff 0%,#dadada 100%);
  219. background: -o-linear-gradient(top, #fff 0%,#dadada 100%);
  220. background: -ms-linear-gradient(top, #fff 0%,#dadada 100%);
  221. background: linear-gradient(to bottom, #fff 0%,#dadada 100%);
  222. border: 1px solid #ccc;
  223. border-bottom: none;
  224. }
  225. .introduce .intro-header span{
  226. font-size: 16px;
  227. color: #323232;
  228. }
  229. .introduce .intro-header span img{
  230. margin-left: 30px;
  231. }
  232. .introduce .intro-header span em{
  233. margin-left: 8px;
  234. font-size: 16px;
  235. color: #323232;
  236. font-style: normal;
  237. }
  238. .introduce .intro-header span input{
  239. position: absolute;
  240. top: 119px;
  241. left: 338px;
  242. width: 65px;
  243. outline: none;
  244. opacity: 0;
  245. }
  246. .introduce textarea{
  247. width: 780px;
  248. height: 325px;
  249. border: 1px solid #ccc;
  250. border-top: none;
  251. border-radius: 0;
  252. }
  253. /*定时发送弹出框*/
  254. .modal-open .modal {
  255. width: 100%;
  256. height: 100%;
  257. }
  258. .modal-open .modal .modal-dialog{
  259. width: 590px;
  260. height: 590px;
  261. }
  262. .modal-open .modal .modal-dialog .modal-content{
  263. width: 590px;
  264. height: 590px;
  265. }
  266. .setting .header{
  267. padding: 0 20px;
  268. width: 100%;
  269. height: 44px;
  270. line-height: 44px;
  271. background: #eeeeee;
  272. }
  273. .setting .header p{
  274. font-size: 16px;
  275. color: #323232;
  276. }
  277. .setting .header .close{
  278. font-size: 38px;
  279. }
  280. .setting .body{
  281. width: 100%;
  282. height: 480px;
  283. padding: 0 20px;
  284. text-align: left;
  285. }
  286. .setting .body .chooseUser{
  287. width: 100%;
  288. height: 100%;
  289. }
  290. .setting .body .chooseUser .search{
  291. margin: 16px 0 22px 0;
  292. width: 429px;
  293. height: 30px;
  294. line-height: 30px;
  295. position: relative;
  296. }
  297. .setting .body .chooseUser .search input{
  298. width: 490px;
  299. height: 30px;
  300. border-radius: 0;
  301. }
  302. .setting .body .chooseUser .search button{
  303. position: absolute;
  304. top: 0;
  305. right: -105px;
  306. margin-left: 13px;
  307. font-size: 14px;
  308. color: #1b71c9;
  309. border: none;
  310. background: none;
  311. }
  312. .setting .body .chooseUser .choose-body {
  313. overflow: hidden;
  314. }
  315. .setting .body .chooseUser .choose-body .item{
  316. width: 230px;
  317. height: 400px;
  318. border: 1px solid #dcdcdc;
  319. }
  320. .setting .body .chooseUser .choose-body .item .top{
  321. width: 100%;
  322. height: 25px;
  323. line-height: 25px;
  324. text-align: center;
  325. font-size: 14px;
  326. color: #8da8b8;
  327. background: #f5f5f5;
  328. }
  329. .setting .body .chooseUser .choose-body .item .bottom{
  330. padding: 20px 0 0 15px;
  331. width: 100%;
  332. height: 365px;
  333. overflow-y: auto;
  334. }
  335. .setting .body .chooseUser .choose-body .item .bottom .item-list{
  336. margin-bottom: 19px;
  337. overflow: hidden ;
  338. }
  339. .setting .body .chooseUser .choose-body .item .bottom .item-list input{
  340. float: left;
  341. margin-right: 14px;
  342. width: 14px;
  343. height: 14px;
  344. }
  345. .setting .body .chooseUser .choose-body .item .bottom .item-list label{
  346. float: left;
  347. width: 165px;
  348. overflow: hidden;
  349. text-overflow: ellipsis ;
  350. white-space: nowrap;
  351. font-size: 14px;
  352. font-weight: normal;
  353. color: #323232;
  354. }
  355. .setting .body .chooseUser .choose-body .center{
  356. margin-top: 160px;
  357. width: 85px;
  358. text-align: center;
  359. }
  360. .setting .body .chooseUser .choose-body .center .choice{
  361. margin-bottom: 18px;
  362. }
  363. .setting .body .chooseUser .choose-body .center button{
  364. width: 68px;
  365. height: 28px;
  366. line-height: 28px;
  367. border: 1px solid #dcdcdc;
  368. font-size: 14px;
  369. color: #323232;
  370. background: -webkit-linear-gradient(top, #fff 0%,#dadada 100%);
  371. background: -o-linear-gradient(top, #fff 0%,#dadada 100%);
  372. background: -ms-linear-gradient(top, #fff 0%,#dadada 100%);
  373. background: linear-gradient(to bottom, #fff 0%,#dadada 100%);
  374. border-radius: 3px;
  375. }
  376. .setting .body .chooseUser .choose-body .center button i{
  377. font-size: 18px;
  378. color: #323232;
  379. }
  380. .setting .footer{
  381. padding-top: 10px;
  382. width: 100%;
  383. height: 50px;
  384. background: #f4f4f4;
  385. }
  386. .setting .footer a{
  387. display: inline-block;
  388. height: 30px;
  389. line-height: 30px;
  390. font-size: 16px;
  391. text-align: center;
  392. border-radius: 3px;
  393. letter-spacing: 10px;
  394. }
  395. .setting .footer a:first-child{
  396. margin-right: 10px;
  397. width: 120px;
  398. color: #fff;
  399. background: #3c8dbc;
  400. }
  401. .setting .footer a:last-child{
  402. width: 80px;
  403. color: #959595;
  404. background: #fff;
  405. border: 1px solid #dcdcdc;
  406. }
  407. /*短息编辑弹出框*/
  408. .modal-open .redact .modal-dialog{
  409. width: 590px;
  410. height: 420px;
  411. }
  412. .modal-open .redact .modal-dialog .modal-content{
  413. width: 590px;
  414. height: 420px;
  415. }
  416. .redact .body{
  417. margin-top: 20px;
  418. height: 325px;
  419. }
  420. .redact .body .form-group{
  421. margin-bottom: 14px;
  422. height: 30px;
  423. line-height: 30px;
  424. }
  425. .redact .body .form-group label{
  426. margin-right: 30px;
  427. width: 60px;
  428. font-family: 'SimHei'!important;
  429. font-weight: normal;
  430. font-size: 14px;
  431. color: #8da8b8;
  432. }
  433. .redact .body .form-group textarea {
  434. margin-bottom: 14px;
  435. width: 456px;
  436. height: 190px;
  437. font-size: 14px;
  438. color: #323232;
  439. border-radius: 0;
  440. }
  441. .redact .body .form-group select{
  442. padding: 0 12px;
  443. width: 456px;
  444. height: 30px;
  445. font-size: 14px;
  446. color: #323232;
  447. border-radius: 0;
  448. }
  449. .redact .body .form-group span{
  450. font-size: 14px;
  451. color: #b4b4b4;
  452. }
  453. /*封面图片Banner*/
  454. .content-setting .form-group .uploadImage{
  455. position: relative;
  456. }
  457. .content-setting .form-group .uploadImage div{
  458. height: 28px;
  459. line-height: 28px;
  460. }
  461. .content-setting .form-group .uploadImage div button{
  462. width: 90px;
  463. height: 28px;
  464. line-height: 28px;
  465. text-align: center;
  466. font-size: 14px;
  467. color: #6d6d6d;
  468. background: -webkit-linear-gradient(top, #fff 0%,#dadada 100%);
  469. background: -o-linear-gradient(top, #fff 0%,#dadada 100%);
  470. background: -ms-linear-gradient(top, #fff 0%,#dadada 100%);
  471. background: linear-gradient(to bottom, #fff 0%,#dadada 100%);
  472. border: 1px solid #dcdcdc;
  473. border-radius: 3px;
  474. }
  475. .content-setting .form-group .uploadImage div span{
  476. margin-left: 20px;
  477. font-size: 12px;
  478. color: #969696;
  479. }
  480. .content-setting .form-group .uploadImage input{
  481. position: absolute;
  482. top: 0;
  483. left: 0;
  484. width: 90px;
  485. height: 28px;
  486. opacity: 0;
  487. outline: none;
  488. }
  489. .content-setting .form-group .uploadImage .img-show {
  490. margin: 15px 0 25px;
  491. width: 160px;
  492. height: 160px;
  493. line-height: 160px;
  494. text-align: center;
  495. }
  496. .content-setting .form-group .uploadImage .img-show img{
  497. width: 100%;
  498. height: 100%;
  499. }
  500. .content-setting .form-group .uploadImage .img-shows {
  501. margin: 15px 0 30px;
  502. width: 480px;
  503. height: 60px;
  504. line-height: 60px;
  505. text-align: center;
  506. }
  507. /* */
  508. button.disabled {
  509. opacity: 0.6;
  510. cursor: not-allowed;
  511. }
  512. </style>
  513. <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
  514. <section class="content-header clearfix">
  515. <h1>活动发起</h1>
  516. </section>
  517. <!-- Main content -->
  518. <section class="content">
  519. <div class="box-show">
  520. <form class="form-horizontal" name="activityForm">
  521. <div class="content-setting">
  522. <div class="form-group clearfix">
  523. <label for="" class="control-label fl">活动标题</label>
  524. <input type="text" class="form-control fl" ng-model="activity.name"/>
  525. </div>
  526. <div class="form-group clearfix">
  527. <label for="" class="control-label fl">活动时间</label>
  528. <div class="active-time fl">
  529. <input type="text" ng-model="activity.startTime" readonly style="float:left"
  530. class="date-choose f1 form-control" placeholder="开始时间"
  531. datepicker-popup="yyyy-MM-dd" is-open="activity.$startTimeOpened"
  532. ng-required="true" max-date="activity.endTime"
  533. current-text="今天" clear-text="清除" close-text="关闭"
  534. datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
  535. ng-click="openDatePicker($event, activity, '$startTimeOpened')">
  536. <span class="fl">至</span>
  537. <input type="text" ng-model="activity.endTime" readonly
  538. class="date-choose f1 form-control" placeholder="结束时间"
  539. datepicker-popup="yyyy-MM-dd" is-open="activity.$endTimeOpened" min-date="activity.startTime"
  540. ng-required="true"
  541. current-text="今天" clear-text="清除" close-text="关闭"
  542. datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
  543. ng-click="openDatePicker($event, activity, '$endTimeOpened')">
  544. </div>
  545. </div>
  546. <div class="form-group clearfix">
  547. <label for="" class="control-label fl">兑奖时间</label>
  548. <div class="active-time fl">
  549. <input type="text" ng-model="activity.receiveStartTime" readonly style="float:left"
  550. class="date-choose f1 form-control" placeholder="开始兑奖时间"
  551. datepicker-popup="yyyy-MM-dd" is-open="activity.$receiveStartTimeOpened"
  552. ng-required="true" min-date="activity.startTime" max-date="activity.endTime"
  553. current-text="今天" clear-text="清除" close-text="关闭"
  554. datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
  555. ng-click="openDatePicker($event, activity, '$receiveStartTimeOpened')">
  556. <span class="fl">至</span>
  557. <input type="text" ng-model="activity.receiveEndTime" readonly
  558. class="date-choose f1 form-control" placeholder="截止兑奖时间"
  559. datepicker-popup="yyyy-MM-dd" is-open="activity.$receiveEndTimeOpened"
  560. ng-required="true" min-date="activity.receiveStartTime" max-date="activity.endTime"
  561. current-text="今天" clear-text="清除" close-text="关闭"
  562. datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
  563. ng-click="openDatePicker($event, activity, '$receiveEndTimeOpened')">
  564. </div>
  565. </div>
  566. <div class="form-group clearfix">
  567. <label class="control-label fl">活动介绍</label>
  568. <div class="fl introduce">
  569. <summernote lang="zh-CN" ng-model="activity.summary" height="300px">
  570. </summernote>
  571. </div>
  572. </div>
  573. <div class="form-group clearfix">
  574. <label class="control-label fl">封面图片</label>
  575. <div class="fl uploadImage">
  576. <div><button>上传图片</button><span>(160*160)</span></div>
  577. <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
  578. <div class="img-show">
  579. <img src="static/images/reward.png" alt="预览" title="预览"/>
  580. </div>
  581. </div>
  582. </div>
  583. <div class="form-group clearfix">
  584. <label for="" class="control-label fl">Banner</label>
  585. <div class="fl uploadImage">
  586. <div><button>上传图片</button><span>(1140*140)</span></div>
  587. <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
  588. <div class="img-show img-shows">
  589. <img src="static/images/active01.png" alt=""/>
  590. </div>
  591. </div>
  592. </div>
  593. <div class="form-group clearfix">
  594. <label for="" class="control-label fl">活动奖品</label>
  595. <div class="prise-list" ng-repeat="award in activity.awards">
  596. <div class="prise-detail">
  597. <div class="award"> <input type="text" ng-model="award.name"></div>
  598. <span>{{$index + 1}}</span>
  599. <a ng-click="deleteAward($index)">删除</a>
  600. </div>
  601. <div class="award-detail clearfix">
  602. <span class="fl">数量</span>
  603. <input type="text" ng-model="award.amount" class="fl form-control">
  604. </div>
  605. <div class="award-detail clearfix">
  606. <span class="fl">奖品等级</span>
  607. <input type="text" ng-model="award.awardLevel" class="fl form-control">
  608. </div>
  609. <div class="award-detail clearfix">
  610. <span class="fl">赠送方式</span>
  611. <select name="" ng-model="award.way" class="form-control fl">
  612. <option ng-value="1">短信通知</option>
  613. <option ng-value="2">快递配送</option>
  614. </select>
  615. <!--<a class="edit-template fl" data-target="#redact" data-toggle="modal">编辑模板</a>-->
  616. </div>
  617. <div class="uploadImg">
  618. 上传图片
  619. <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, $index + 2)'>
  620. </div>
  621. </div>
  622. <div class="add-price">
  623. <span ng-click="addAward()">+添加奖品</span>
  624. </div>
  625. </div>
  626. </div>
  627. <div class="form-group clearfix">
  628. <label class="control-label fl">活动项目</label>
  629. <div class="project fl">
  630. <div class="activity-project">
  631. <span ng-repeat="relatedProject in selectedProjects">
  632. {{relatedProject.name}}
  633. </span>
  634. </div>
  635. <div class="add-project" data-target="#setting" data-toggle="modal">
  636. <span>+选择项目</span>
  637. </div>
  638. <div class="button">
  639. <a ng-click="submit(true)" class="launch">发布</a>
  640. <a ng-click="submit(false)" class="draft">存为草稿</a>
  641. <span class="clear" ng-click="refresh()">清空内容</span>
  642. </div>
  643. </div>
  644. </div>
  645. </div>
  646. </form>
  647. </div>
  648. </section>
  649. </div>
  650. <!--选择关联项目弹出框-->
  651. <div class="modal setting" role="dialog" id="setting" data-backdrop="static">
  652. <div class="modal-dialog">
  653. <div class="modal-content">
  654. <div class="modal-header header">
  655. <p class="fl">选择关联项目</p>
  656. <div class="close fr" data-dismiss="modal" ng-click="cancelSelected()">&times;</div>
  657. </div>
  658. <div class="modal-body body">
  659. <div class="chooseUser">
  660. <div class="search">
  661. <input type="text" ng-model="keyword" ng-change="onSearch()" placeholder="请输入关键字" class="form-control">
  662. <button ng-click="onSearch()">搜索</button>
  663. </div>
  664. <div class="choose-body">
  665. <div class="item fl">
  666. <div class="top">全部项目</div>
  667. <div class="bottom">
  668. <div class="item-list" ng-repeat="project in projects">
  669. <input ng-model="project.checked" ng-click="checkSelected(project)" type="checkbox"/>
  670. <label>{{project.name}}</label>
  671. </div>
  672. </div>
  673. </div>
  674. <div class="center fl">
  675. <div class="choice"><button ng-click="addSelected()" ng-disabled="projects.length == 0" ng-class="{'disabled': projects.length == 0}">选择&nbsp;&nbsp;<i class="fa fa-angle-right"></i></button></div>
  676. <div class="delete"><button ng-click="deleteSelected()" ng-disabled="selectedProjects.length ==0" ng-class="{'disabled': selectedProjects.length == 0}"><i class="fa fa-angle-left"></i>&nbsp;&nbsp;删除</button></div>
  677. </div>
  678. <div class="item fr">
  679. <div class="top">已选项目</div>
  680. <div class="bottom">
  681. <div class="item-list" ng-repeat="project in selectedProjects">
  682. <input ng-model="project.checked" type="checkbox"/>
  683. <label>{{project.name}}</label>
  684. </div>
  685. </div>
  686. </div>
  687. </div>
  688. </div>
  689. </div>
  690. <div class="modal-footer footer text-right">
  691. <a href="" data-dismiss="modal">保存</a>
  692. <a href="" ng-click="cancelSelected()" data-dismiss="modal">取消</a>
  693. </div>
  694. </div>
  695. </div>
  696. </div>
  697. <script type="text/javascript">
  698. $(document).ready(function() {
  699. var btn = document.getElementsByClassName('dropdown-toggle');
  700. console.log(btn.length);
  701. for (var i = 0; i < btn.length; i++) {
  702. console.log(btn);
  703. var sib = btn[i].nextElementSibling;
  704. var flag = true;
  705. console.log(btn[i].nextElementSibling);
  706. btn[i].onclick = function () {
  707. if (flag) {
  708. sib.style.display = 'none';
  709. flag = false
  710. } else {
  711. sib.style.display = 'block';
  712. flag = true
  713. }
  714. }
  715. }
  716. });
  717. </script>