_form.blade.php 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. {{ csrf_field() }}
  2. <div class="box box-primary">
  3. <div class="box-header with-border">
  4. <h3 class="box-title"></h3>
  5. </div>
  6. <input type="hidden" name="section_position" id="section_position" value="{{$section_position}}">
  7. <input type="hidden" name="region_1_position" id="region_1_position" value="{{$region_1_position}}">
  8. <input type="hidden" name="region_2_position" id="region_2_position" value="{{$region_2_position}}">
  9. <div class="box-body">
  10. <div class="row">
  11. <div class="col-md-4">
  12. <div class="form-group">
  13. {!! Form::label('title', 'Titolo:') !!} <span id="chars">{{isset($news) ? 100 - strlen($news->title) : 100}} caratteri rimanenti</span>
  14. {!! Form::text('title', null, array('class' => 'form-control title', 'maxlength' => 100)) !!}
  15. </div>
  16. </div>
  17. <div class="col-md-4">
  18. <div class="form-group">
  19. {!! Form::label('title_region_1', 'Titolo regione 1:') !!} <span id="chars_region_1">{{isset($news) ? 100 - strlen($news->title_region_1) : 100}} caratteri rimanenti</span>
  20. {!! Form::text('title_region_1', null, array('class' => 'form-control title_region_1', 'maxlength' => 100)) !!}
  21. </div>
  22. </div>
  23. <div class="col-md-4">
  24. <div class="form-group">
  25. {!! Form::label('title_region_2', 'Titolo regione 2:') !!} <span id="chars_region_2">{{isset($news) ? 100 - strlen($news->title_region_2) : 100}} caratteri rimanenti</span>
  26. {!! Form::text('title_region_2', null, array('class' => 'form-control title_region_2', 'maxlength' => 100)) !!}
  27. </div>
  28. </div>
  29. </div>
  30. <div class="row">
  31. <div class="col-md-4">
  32. <div class="form-group">
  33. {!! Form::label('homepage_position', 'Posizione primo piano:') !!}
  34. {!! Form::select('homepage_position', ['' => '', 'slide1' => 'Apertura', 'left1' => 'Slide Sinistra 1', 'left2' => 'Slide Sinistra 2', 'left3' => 'Slide Sinistra 3', 'right1' => 'Slide Destra 1', 'right2' => 'Slide Destra 2', 'right3' => 'Slide Destra 3'], null, ['class' => 'form-control']) !!}
  35. </div>
  36. </div>
  37. <div class="col-md-8">
  38. <div class="form-group">
  39. {!! Form::label('aaa', 'News attualmente in primo piano:') !!}<br>
  40. <ul>
  41. {!! @$first !!}
  42. </ul>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="row">
  47. <div class="col-md-4">
  48. <div class="form-group">
  49. {!! Form::label('section_id', 'Sezione:') !!}
  50. {!! Form::select('section_id', [''=>''] + $sections, null, ['class' => 'form-control section_id_change']) !!}
  51. </div>
  52. </div>
  53. <div class="col-md-4">
  54. <div class="form-group">
  55. {!! Form::label('region_1_id', 'Regione 1:') !!}
  56. {!! Form::select('region_1_id', [''=>''] + $regions, null, ['class' => 'form-control region_1_id_change']) !!}
  57. </div>
  58. </div>
  59. <div class="col-md-4">
  60. <div class="form-group">
  61. {!! Form::label('region_2_id', 'Regione 2:') !!}
  62. {!! Form::select('region_2_id', [''=>''] + $regions, null, ['class' => 'form-control region_2_id_change']) !!}
  63. </div>
  64. </div>
  65. </div>
  66. <div class="row">
  67. @if(isset($news))
  68. @if(($news->section_id > 0 && $news->section_position != '') || (!$news->online && $news->section_id > 0))
  69. <div class="col-md-4" id="layout_section" style="display:{{(isset($news) && $news->section_position != '') || !isset($news) ? 'block' : 'none'}}">
  70. </div>
  71. @else
  72. <div class="col-md-4">
  73. {!! isset($news->section) ? $news->section->position($news->id) : ''!!}
  74. </div>
  75. @endif
  76. @else
  77. <div class="col-md-4" id="layout_section" style="display:{{(isset($news) && $news->section_position != '') || !isset($news) ? 'block' : 'none'}}">
  78. </div>
  79. @endif
  80. @if(isset($news))
  81. @if(($news->region_1_id > 0 && $news->region_1_position != '') || (!$news->online && $news->region_1_id > 0))
  82. <div class="col-md-4" id="layout_region_1" style="display:{{(isset($news) && $news->region_1_position != '') || !isset($news) ? 'block' : 'none'}}">
  83. </div>
  84. @else
  85. <div class="col-md-4">
  86. {!! isset($news->region_1) ? $news->region_1->position($news->id) : ''!!}
  87. </div>
  88. @endif
  89. @else
  90. <div class="col-md-4" id="layout_region_1" style="display:{{(isset($news) && $news->region_1_position != '') || !isset($news) ? 'block' : 'none'}}">
  91. </div>
  92. @endif
  93. @if(isset($news))
  94. @if(($news->region_2_id > 0 && $news->region_2_position != '') || (!$news->online && $news->region_2_id > 0))
  95. <div class="col-md-4" id="layout_region_2" style="display:{{(isset($news) && $news->region_2_position != '') || !isset($news) ? 'block' : 'none'}}">
  96. </div>
  97. @else
  98. <div class="col-md-4">
  99. {!! isset($news->region_2) ? $news->region_2->position($news->id) : ''!!}
  100. </div>
  101. @endif
  102. @else
  103. <div class="col-md-4" id="layout_region_2" style="display:{{(isset($news) && $news->region_2_position != '') || !isset($news) ? 'block' : 'none'}}">
  104. </div>
  105. @endif
  106. </div>
  107. <div class="row">
  108. <div class="col-md-6">
  109. <div class="form-group">
  110. {!! Form::label('event_id', 'Evento:') !!}
  111. {!! Form::select('event_id', [null => ''] + $events, null, ['class' => 'form-control']) !!}
  112. </div>
  113. </div>
  114. <div class="col-md-6">
  115. <div class="form-group">
  116. {!! Form::label('page_id', 'Pagina WEB:') !!}
  117. {!! Form::select('page_id', [null => ''] + $pages, null, ['class' => 'form-control']) !!}
  118. </div>
  119. </div>
  120. </div>
  121. <div class="row">
  122. <div class="col-md-6">
  123. <div class="form-group">
  124. {!! Form::label('text_short', 'Testo breve:') !!}
  125. {!! Form::text('text_short', null, array('class' => 'form-control', 'maxlength' => '100')) !!}
  126. </div>
  127. </div>
  128. <div class="col-md-6">
  129. <div class="form-group">
  130. {!! Form::label('date', 'Data:') !!}
  131. {!! Form::text('date', isset($news) ? null : date("d/m/Y H:i"), array('class' => 'form-control')) !!}
  132. </div>
  133. </div>
  134. </div>
  135. <div class="row">
  136. <div class="col-md-12">
  137. <div class="form-group">
  138. {!! Form::label('text', 'Testo:') !!}
  139. {!! Form::textarea('text', null, array('rows' => 30, 'cols' => 100, 'class' => 'form-control js-editor')) !!}
  140. </div>
  141. </div>
  142. </div>
  143. @if(isset($news))
  144. <div class="row">
  145. <div class="col-md-4">
  146. <div class="form-group">
  147. {!! Form::label('image', 'Immagine principale:') !!}<br>
  148. {!! Form::submit('Sostituisci immagine', ['class'=>'btn btn-success', 'name' => 'crop']) !!}
  149. @if(false)
  150. <div class="custom-file-upload">{!! Form::file('image', null, array('class' => 'form-control')) !!}</div>
  151. @endif
  152. @if (isset($news) && $news->image != '')
  153. <br><img src="/files/news/{{$news->image}}" style="max-width:250px" />
  154. @endif
  155. @if (isset($_GET["filename"]))
  156. <br><img src="/files/news/{{$_GET["filename"]}}" style="max-width:250px" />
  157. <input type="hidden" name="filename" value="{{$_GET["filename"]}}">
  158. @endif
  159. </div>
  160. </div>
  161. <div class="col-md-4">
  162. <div class="form-group">
  163. {!! Form::label('image1', 'Immagine 1:') !!}<br>
  164. <div class="custom-file-upload">{!! Form::file('image1', null, array('class' => 'form-control')) !!}</div>
  165. @if (isset($news) && $news->image1 != '')
  166. <br><img src="/files/news/{{$news->image1}}" style="max-width:150px" />
  167. @endif
  168. </div>
  169. </div>
  170. <div class="col-md-4">
  171. <div class="form-group">
  172. {!! Form::label('image2', 'Immagine 2:') !!}<br>
  173. <div class="custom-file-upload">{!! Form::file('image2', null, array('class' => 'form-control')) !!}</div>
  174. @if (isset($news) && $news->image2 != '')
  175. <br><img src="/files/news/{{$news->image2}}" style="max-width:150px" />
  176. @endif
  177. </div>
  178. </div>
  179. </div>
  180. <div class="row">
  181. <div class="col-md-4">
  182. <div class="form-group">
  183. {!! Form::label('image3', 'Immagine 3:') !!}<br>
  184. <div class="custom-file-upload">{!! Form::file('image3', null, array('class' => 'form-control')) !!}</div>
  185. @if (isset($news) && $news->image3 != '')
  186. <br><img src="/files/news/{{$news->image3}}" style="max-width:150px" />
  187. @endif
  188. </div>
  189. </div>
  190. <div class="col-md-4">
  191. <div class="form-group">
  192. {!! Form::label('image4', 'Immagine 4:') !!}<br>
  193. <div class="custom-file-upload">{!! Form::file('image4', null, array('class' => 'form-control')) !!}</div>
  194. @if (isset($news) && $news->image4 != '')
  195. <br><img src="/files/news/{{$news->image4}}" style="max-width:150px" />
  196. @endif
  197. </div>
  198. </div>
  199. <div class="col-md-4">
  200. <div class="form-group">
  201. {!! Form::label('image5', 'Immagine 5:') !!}<br>
  202. <div class="custom-file-upload">{!! Form::file('image5', null, array('class' => 'form-control')) !!}</div>
  203. @if (isset($news) && $news->image5 != '')
  204. <br><img src="/files/news/{{$news->image5}}" style="max-width:150px" />
  205. @endif
  206. </div>
  207. </div>
  208. </div>
  209. <div class="row">
  210. <div class="col-md-6">
  211. <div class="form-group">
  212. {!! Form::label('video', 'Video:') !!}
  213. {!! Form::textarea('video', null, array('rows' => 5, 'cols' => 50, 'class' => 'form-control')) !!}
  214. </div>
  215. </div>
  216. <div class="col-md-6">
  217. <div class="form-group">
  218. {!! Form::label('pdf', 'PDF:') !!}
  219. <div class="custom-file-upload">{!! Form::file('pdf', null, array('class' => 'form-control')) !!}</div>
  220. @if (isset($news) && $news->pdf != '')
  221. <br><a href="/files/news/{{$news->pdf}}" target="_blank">Visualizza</a>
  222. &nbsp;<input type="checkbox" name="remove_pdf">&nbsp;Rimuovi
  223. @endif
  224. </div>
  225. </div>
  226. </div>
  227. <div class="row">
  228. <div class="col-md-6">
  229. <div class="form-group">
  230. {!! Form::label('meta_title', 'Meta - Titolo:') !!}
  231. {!! Form::text('meta_title', null, array('class' => 'form-control')) !!}
  232. </div>
  233. </div>
  234. <div class="col-md-6">
  235. <div class="form-group">
  236. {!! Form::label('meta_keywords', 'Meta - Parole chiave:') !!}
  237. {!! Form::text('meta_keywords', null, array('class' => 'form-control')) !!}
  238. </div>
  239. </div>
  240. </div>
  241. <div class="row">
  242. <div class="col-md-6">
  243. <div class="form-group">
  244. {!! Form::label('meta_description', 'Meta - Descrizione:') !!}
  245. {!! Form::textarea('meta_description', null, array('rows' => 5, 'cols' => 50, 'class' => 'form-control')) !!}
  246. </div>
  247. </div>
  248. <div class="col-md-6">
  249. <div class="form-group">
  250. {!! Form::label('slug', 'Slug:') !!}
  251. {!! Form::text('slug', null, array('class' => 'form-control slug')) !!}
  252. </div>
  253. </div>
  254. </div>
  255. <div class="row">
  256. <div class="col-md-12">
  257. <div class="form-group">
  258. {!! Form::label('no_social', 'Selezionando questo flag la news NON viene pubblicata su Facebook/Twitter ma solamente sul sito:') !!}<br>
  259. {!! Form::checkbox('no_social', 'on', null) !!}
  260. </div>
  261. </div>
  262. </div>
  263. <div class="row">
  264. <div class="col-md-4">
  265. <div class="form-group">
  266. {!! Form::label('live', 'Live:') !!}<br>
  267. {!! Form::checkbox('live', 'on', null) !!}
  268. </div>
  269. </div>
  270. <div class="col-md-4">
  271. <div class="form-group">
  272. {!! Form::label('breaking_news', 'Breaking news:') !!}<br>
  273. {!! Form::checkbox('breaking_news', 'on', null) !!}
  274. </div>
  275. </div>
  276. </div>
  277. @else
  278. <input type="hidden" name="slug" class="slug">
  279. <div class="row">
  280. <div class="col-md-4">
  281. <div class="form-group">
  282. {!! Form::label('image', 'Immagine principale:') !!}<br>
  283. <div class="custom-file-upload">{!! Form::file('image', null, array('class' => 'form-control')) !!}</div>
  284. @if (isset($_GET["filename"]))
  285. <br><img src="/files/news/{{$_GET["filename"]}}" style="max-width:250px" />
  286. <input type="hidden" name="filename" value="{{$_GET["filename"]}}">
  287. @endif
  288. </div>
  289. </div>
  290. @if (!isset($_GET["filename"]))
  291. <div class="col-md-4">
  292. <div class="form-group">
  293. {!! Form::label('breaking_news', 'Breaking news:') !!}<br>
  294. {!! Form::checkbox('breaking_news', 'on', isset($_GET["filename"]) ? false : true) !!}
  295. </div>
  296. </div>
  297. @endif
  298. </div>
  299. @endif
  300. </div>
  301. <div class="box-footer">
  302. @if(isset($news))
  303. @if($news->user_id > 0 && $news->user_id != Auth::user()->id)
  304. <span style="color:red; font-weight:bold">ATTENZIONE : l'utente {{$news->user->name}} sta modificando questa news</span><br><br>
  305. @endif
  306. @endif
  307. {!! Form::submit($submit_text, ['class'=>'btn btn-success saved', 'name' => 'save']) !!}
  308. {!! Form::submit('Salva ed esci', ['class'=>'btn btn-success saved', 'name' => 'save_exit']) !!}
  309. @if(isset($news))
  310. @if(!$news->online)
  311. {!! Form::submit('Pubblica', ['class'=>'btn btn-success saved', 'name' => 'publish']) !!}
  312. @else
  313. {!! Form::submit('Torna bozza', ['class'=>'btn btn-success saved', 'name' => 'unpublish']) !!}
  314. @endif
  315. @else
  316. {!! Form::submit('Pubblica', ['class'=>'btn btn-success saved', 'name' => 'publish']) !!}
  317. @endif
  318. {!! link_to_route('news.index', 'Annulla', null, array('class' => 'btn btn-info')) !!}
  319. </div>
  320. </div>
  321. @section('extra_css')
  322. <link rel="stylesheet" href="/backend/plugins/daterangepicker/daterangepicker.css">
  323. @stop
  324. @section('extra_js')
  325. <script src="/backend/plugins/input-mask/jquery.inputmask.js"></script>
  326. <script src="/backend/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
  327. <script src="/backend/plugins/input-mask/jquery.inputmask.extensions.js"></script>
  328. <script src="/backend/plugins/moment/moment.min.js"></script>
  329. <script src="/backend/plugins/daterangepicker/daterangepicker.js"></script>
  330. <script>
  331. $(function () {
  332. $('form').on('submit', function(e){
  333. if($("#page_id").val() == '')
  334. {
  335. if (!confirm("Attenzione, stai salvando una news senza pagina web, confermi?"))
  336. {
  337. e.preventDefault();
  338. }
  339. }
  340. else
  341. {
  342. $(".saved").click(function(){
  343. $(".saved").each(function(){
  344. $(this).hide();
  345. });
  346. });
  347. }
  348. });
  349. var layouts = [];
  350. @foreach($layouts as $i => $l)
  351. layouts[{{$i}}] = '{{$l}}';
  352. @endforeach
  353. $('.js-editor').summernote({
  354. height: 300,
  355. lang: 'it-IT'
  356. });
  357. $("[name='date']").daterangepicker({ singleDatePicker: true, timePicker: true, timePicker24Hour: true, locale: { format: 'DD/MM/YYYY HH:mm' }})
  358. @if(!isset($news))
  359. $(".title").keyup(function(){
  360. var Text = $(this).val();
  361. Text = Text.toLowerCase();
  362. Text = Text.replace(/[^a-zA-Z0-9]+/g,'-');
  363. $(".slug").val(Text);
  364. });
  365. @endif
  366. $('.title').on("keyup change", function () {
  367. const max = 100;
  368. const len = $(this).val().length;
  369. if (len >= max)
  370. {
  371. $('#chars').text("0 caratteri rimanenti");
  372. }
  373. else
  374. {
  375. const char = max - len;
  376. $('#chars').text(char + ' caratteri rimanenti');
  377. }
  378. });
  379. $('.title_region_1').on("keyup change", function () {
  380. const max = 100;
  381. const len = $(this).val().length;
  382. if (len >= max)
  383. {
  384. $('#chars_region_1').text("0 caratteri rimanenti");
  385. }
  386. else
  387. {
  388. const char = max - len;
  389. $('#chars_region_1').text(char + ' caratteri rimanenti');
  390. }
  391. });
  392. $('.title_region_2').on("keyup change", function () {
  393. const max = 100;
  394. const len = $(this).val().length;
  395. if (len >= max)
  396. {
  397. $('#chars_region_2').text("0 caratteri rimanenti");
  398. }
  399. else
  400. {
  401. const char = max - len;
  402. $('#chars_region_2').text(char + ' caratteri rimanenti');
  403. }
  404. });
  405. $(".section_id_change").change(function(){
  406. var layout = layouts[this.value];
  407. loadLayoutSection(layout, 'section');
  408. $("#section_position").val('');
  409. });
  410. $(".region_1_id_change").change(function(){
  411. if(this.value != "" && this.value == $(".region_2_id_change").val())
  412. {
  413. alert('Attenzione, la regione selezionata è già associata a REGIONE2');
  414. $(".region_1_id_change").val('');
  415. loadLayoutSection('', 'region_1');
  416. $("#region_1_position").val('');
  417. }
  418. else
  419. {
  420. var layout = layouts[this.value];
  421. loadLayoutSection(layout, 'region_1');
  422. $("#region_1_position").val('');
  423. }
  424. });
  425. $(".region_2_id_change").change(function(){
  426. if(this.value != "" && this.value == $(".region_1_id_change").val())
  427. {
  428. alert('Attenzione, la regione selezionata è già associata a REGIONE1');
  429. $(".region_2_id_change").val('');
  430. loadLayoutSection('', 'region_2');
  431. $("#region_2_position").val('');
  432. }
  433. else
  434. {
  435. var layout = layouts[this.value];
  436. loadLayoutSection(layout, 'region_2');
  437. $("#region_2_position").val('');
  438. }
  439. });
  440. $(document). on("click", ".btSelect" , function() {
  441. var where = $(this).attr('data-where');
  442. $(".boxLayout." + where).attr('style', 'border:1px solid gray; padding:10px;background-color: white !important');
  443. $(this).parent().attr('style', 'border:1px solid gray; padding:10px;background-color: red !important');
  444. $("#" + where + "_position").val($(this).attr('data-position'));
  445. });
  446. @if(isset($news))
  447. @if(($news->section_id > 0 && $news->section_position != '') || (!$news->online && $news->section_id > 0))
  448. var layout = layouts[{{$news->section_id}}];
  449. loadLayoutSection(layout, 'section');
  450. @endif
  451. @if(($news->region_1_id > 0 && $news->region_1_position != '') || (!$news->online && $news->region_1_id > 0))
  452. var layout = layouts[{{$news->region_1_id}}];
  453. loadLayoutSection(layout, 'region_1');
  454. @endif
  455. @if(($news->region_2_id > 0 && $news->region_2_position != '') || (!$news->online && $news->region_2_id > 0))
  456. var layout = layouts[{{$news->region_2_id}}];
  457. loadLayoutSection(layout, 'region_2');
  458. @endif
  459. @endif
  460. @if($section_position != '')
  461. $( "input[data-where='section'][data-position='{{$section_position}}']" ).parent().attr('style', 'border:1px solid gray; padding:10px;background-color: red !important');
  462. @endif
  463. @if($region_1_position != '')
  464. $( "input[data-where='region_1'][data-position='{{$region_1_position}}']" ).parent().attr('style', 'border:1px solid gray; padding:10px;background-color: red !important');
  465. @endif
  466. @if($region_2_position != '')
  467. $( "input[data-where='region_2'][data-position='{{$region_2_position}}']" ).parent().attr('style', 'border:1px solid gray; padding:10px;background-color: red !important');
  468. @endif
  469. });
  470. function loadLayoutSection(layout, position)
  471. {
  472. if (layout != '')
  473. {
  474. var html = '<div class="col-md-10" style="margin-left:20px;margin-right:20px">';
  475. if (layout == 'layout_1')
  476. {
  477. html += '<div class="row"><div class="col-md-12 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="big" value="SEL."></div></div>';
  478. html += '<div class="row">';
  479. html += '<div class="col-md-4 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small1" value="SEL."></div>';
  480. html += '<div class="col-md-4 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small2" value="SEL."></div>';
  481. html += '<div class="col-md-4 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small3" value="SEL."></div>';
  482. html += '</div>';
  483. }
  484. if (layout == 'layout_2')
  485. {
  486. html += '<div class="row"><div class="col-md-12 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="big" value="SEL."></div></div>';
  487. html += '<div class="row">';
  488. html += '<div class="col-md-4 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small1" value="SEL."></div>';
  489. html += '<div class="col-md-4 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small2" value="SEL."></div>';
  490. html += '<div class="col-md-4 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small3" value="SEL."></div>';
  491. html += '</div>';
  492. }
  493. if (layout == 'layout_3')
  494. {
  495. html += '<div class="row"><div class="col-md-12 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="big" value="SEL."></div></div>';
  496. html += '<div class="row">';
  497. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small1" value="SEL."></div>';
  498. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small2" value="SEL."></div>';
  499. html += '</div>';
  500. html += '<div class="row">';
  501. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small3" value="SEL."></div>';
  502. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small4" value="SEL."></div>';
  503. html += '</div>';
  504. }
  505. if (layout == 'layout_4')
  506. {
  507. html += '<div class="row"><div class="col-md-12 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="big" value="SEL."></div></div>';
  508. html += '<div class="row">';
  509. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small1" value="SEL."></div>';
  510. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small2" value="SEL."></div>';
  511. html += '</div>';
  512. html += '<div class="row">';
  513. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small3" value="SEL."></div>';
  514. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small4" value="SEL."></div>';
  515. html += '</div>';
  516. html += '<div class="row">';
  517. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small5" value="SEL."></div>';
  518. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small6" value="SEL."></div>';
  519. html += '</div>';
  520. }
  521. if (layout == 'layout_5')
  522. {
  523. html += '<div class="row"><div class="col-md-12 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="big" value="SEL."></div></div>';
  524. html += '<div class="row">';
  525. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small1" value="SEL."></div>';
  526. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small2" value="SEL."></div>';
  527. html += '</div>';
  528. html += '<div class="row">';
  529. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small3" value="SEL."></div>';
  530. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small4" value="SEL."></div>';
  531. html += '</div>';
  532. }
  533. if (layout == 'layout_6')
  534. {
  535. html += '<div class="row">';
  536. html += '<div class="col-md-6 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="big" value="SEL."></div>';
  537. html += '<div class="col-md-6">';
  538. html += '<div class="col-md-12 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small1" value="SEL."></div>';
  539. html += '<div class="col-md-12 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small2" value="SEL."></div>';
  540. html += '<div class="col-md-12 text-center boxLayout ' + position + '" style="border:1px solid gray; padding:10px;"><input type="button" class="btSelect" data-where="' + position + '" data-position="small3" value="SEL."></div>';
  541. html += '</div>';
  542. html += '</div>';
  543. }
  544. html += "</div>";
  545. $("#layout_" + position).html(html);
  546. $("#layout_" + position).show();
  547. }
  548. else
  549. {
  550. $("#layout_" + position).html('');
  551. }
  552. }
  553. </script>
  554. @stop