/
home2
/
dakshskx
/
dakshaseo.com
/
admin
/
assets
/
scripts
/
custom
/
/home2/dakshskx/dakshaseo.com/admin/assets/scripts/custom
mkdir
upload
Name
Size
Mode
Actions
calendar.js
7412
0644
edit
dl
rm
charts.js
31498
0644
edit
dl
rm
coming-soon.js
661
0644
edit
dl
rm
components-dropdowns.js
10383
0644
edit
dl
rm
components-editors.js
516
0644
edit
dl
rm
components-form-tools.js
19133
0644
edit
dl
rm
components-ion-sliders.js
2318
0644
edit
dl
rm
components-jqueryui-sliders.js
3680
0644
edit
dl
rm
components-knob-dials.js
546
0644
edit
dl
rm
components-nouisliders.js
1788
0644
edit
dl
rm
components-pickers.js
7852
0644
edit
dl
rm
contact-us.js
632
0644
edit
dl
rm
custom.js
553
0644
edit
dl
rm
ecommerce-index.js
8069
0644
edit
dl
rm
ecommerce-orders-view.js
7339
0644
edit
dl
rm
ecommerce-orders.js
2772
0644
edit
dl
rm
ecommerce-products-edit.js
6521
0644
edit
dl
rm
ecommerce-products.js
2789
0644
edit
dl
rm
form-dropzone.js
1434
0644
edit
dl
rm
form-editable.js
18643
0644
edit
dl
rm
form-fileupload.js
2722
0644
edit
dl
rm
form-image-crop.js
17044
0644
edit
dl
rm
form-samples.js
1484
0644
edit
dl
rm
form-validation.js
12008
0644
edit
dl
rm
form-wizard.js
10442
0644
edit
dl
rm
inbox.js
9643
0644
edit
dl
rm
index11.js
32605
0644
edit
dl
rm
lock.js
395
0644
edit
dl
rm
login-soft.js
8472
0644
edit
dl
rm
login.js
8332
0644
edit
dl
rm
maps-google.js
6153
0644
edit
dl
rm
maps-vector.js
1897
0644
edit
dl
rm
portfolio.js
192
0644
edit
dl
rm
portlet-draggable.js
655
0644
edit
dl
rm
search.js
287
0644
edit
dl
rm
table-advanced.js
4583
0644
edit
dl
rm
table-ajax.js
3364
0644
edit
dl
rm
table-editable.js
6191
0644
edit
dl
rm
table-managed.js
6084
0644
edit
dl
rm
tasks.js
383
0644
edit
dl
rm
ui-alert-dialog-api.js
3347
0644
edit
dl
rm
ui-blockui.js
3894
0644
edit
dl
rm
ui-datepaginator.js
805
0644
edit
dl
rm
ui-extended-modals.js
2564
0644
edit
dl
rm
ui-general.js
6624
0644
edit
dl
rm
ui-idletimeout.js
2330
0644
edit
dl
rm
ui-nestable.js
1591
0644
edit
dl
rm
ui-notific8.js
1472
0644
edit
dl
rm
ui-toastr.js
4990
0644
edit
dl
rm
ui-tree.js
6458
0644
edit
dl
rm
Edit:
/home2/dakshskx/dakshaseo.com/admin/assets/scripts/custom/components-dropdowns.js
(10383B)
var ComponentsDropdowns = function () { var handleSelect2 = function () { $('#select2_sample1').select2({ placeholder: "Select an option", allowClear: true }); $('#select2_sample2').select2({ placeholder: "Select a State", allowClear: true }); $("#select2_sample3").select2({ placeholder: "Select...", allowClear: true, minimumInputLength: 1, query: function (query) { var data = { results: [] }, i, j, s; for (i = 1; i < 5; i++) { s = ""; for (j = 0; j < i; j++) { s = s + query.term; } data.results.push({ id: query.term + i, text: s }); } query.callback(data); } }); function format(state) { if (!state.id) return state.text; // optgroup return "<img class='flag' src='assets/img/flags/" + state.id.toLowerCase() + ".png'/> " + state.text; } $("#select2_sample4").select2({ placeholder: "Select a Country", allowClear: true, formatResult: format, formatSelection: format, escapeMarkup: function (m) { return m; } }); $("#select2_sample5").select2({ tags: ["red", "green", "blue", "yellow", "pink"] }); function movieFormatResult(movie) { var markup = "<table class='movie-result'><tr>"; if (movie.posters !== undefined && movie.posters.thumbnail !== undefined) { markup += "<td valign='top'><img src='" + movie.posters.thumbnail + "'/></td>"; } markup += "<td valign='top'><h5>" + movie.title + "</h5>"; if (movie.critics_consensus !== undefined) { markup += "<div class='movie-synopsis'>" + movie.critics_consensus + "</div>"; } else if (movie.synopsis !== undefined) { markup += "<div class='movie-synopsis'>" + movie.synopsis + "</div>"; } markup += "</td></tr></table>" return markup; } function movieFormatSelection(movie) { return movie.title; } $("#select2_sample6").select2({ placeholder: "Search for a movie", minimumInputLength: 1, ajax: { // instead of writing the function to execute the request we use Select2's convenient helper url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json", dataType: 'jsonp', data: function (term, page) { return { q: term, // search term page_limit: 10, apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working }; }, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data return { results: data.movies }; } }, initSelection: function (element, callback) { // the input tag has a value attribute preloaded that points to a preselected movie's id // this function resolves that id attribute to an object that select2 can render // using its formatResult renderer - that way the movie name is shown preselected var id = $(element).val(); if (id !== "") { $.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/" + id + ".json", { data: { apikey: "ju6z9mjyajq2djue3gbvv26t" }, dataType: "jsonp" }).done(function (data) { callback(data); }); } }, formatResult: movieFormatResult, // omitted for brevity, see the source of this page formatSelection: movieFormatSelection, // omitted for brevity, see the source of this page dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller escapeMarkup: function (m) { return m; } // we do not want to escape markup since we are displaying html in results }); } var handleSelect2Modal = function () { $('#select2_sample_modal_1').select2({ placeholder: "Select an option", allowClear: true }); $('#select2_sample_modal_2').select2({ placeholder: "Select a State", allowClear: true }); $("#select2_sample_modal_3").select2({ allowClear: true, minimumInputLength: 1, query: function (query) { var data = { results: [] }, i, j, s; for (i = 1; i < 5; i++) { s = ""; for (j = 0; j < i; j++) { s = s + query.term; } data.results.push({ id: query.term + i, text: s }); } query.callback(data); } }); function format(state) { if (!state.id) return state.text; // optgroup return "<img class='flag' src='assets/img/flags/" + state.id.toLowerCase() + ".png'/> " + state.text; } $("#select2_sample_modal_4").select2({ allowClear: true, formatResult: format, formatSelection: format, escapeMarkup: function (m) { return m; } }); $("#select2_sample_modal_5").select2({ tags: ["red", "green", "blue", "yellow", "pink"] }); function movieFormatResult(movie) { var markup = "<table class='movie-result'><tr>"; if (movie.posters !== undefined && movie.posters.thumbnail !== undefined) { markup += "<td valign='top'><img src='" + movie.posters.thumbnail + "'/></td>"; } markup += "<td valign='top'><h5>" + movie.title + "</h5>"; if (movie.critics_consensus !== undefined) { markup += "<div class='movie-synopsis'>" + movie.critics_consensus + "</div>"; } else if (movie.synopsis !== undefined) { markup += "<div class='movie-synopsis'>" + movie.synopsis + "</div>"; } markup += "</td></tr></table>" return markup; } function movieFormatSelection(movie) { return movie.title; } $("#select2_sample_modal_6").select2({ placeholder: "Search for a movie", minimumInputLength: 1, ajax: { // instead of writing the function to execute the request we use Select2's convenient helper url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json", dataType: 'jsonp', data: function (term, page) { return { q: term, // search term page_limit: 10, apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working }; }, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data return { results: data.movies }; } }, initSelection: function (element, callback) { // the input tag has a value attribute preloaded that points to a preselected movie's id // this function resolves that id attribute to an object that select2 can render // using its formatResult renderer - that way the movie name is shown preselected var id = $(element).val(); if (id !== "") { $.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/" + id + ".json", { data: { apikey: "ju6z9mjyajq2djue3gbvv26t" }, dataType: "jsonp" }).done(function (data) { callback(data); }); } }, formatResult: movieFormatResult, // omitted for brevity, see the source of this page formatSelection: movieFormatSelection, // omitted for brevity, see the source of this page dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller escapeMarkup: function (m) { return m; } // we do not want to escape markup since we are displaying html in results }); } var handleBootstrapSelect = function() { $('.bs-select').selectpicker({ iconBase: 'fa', tickIcon: 'fa-check' }); } var handleMultiSelect = function () { $('#my_multi_select1').multiSelect(); $('#my_multi_select2').multiSelect({ selectableOptgroup: true }); } return { //main function to initiate the module init: function () { handleSelect2(); handleSelect2Modal(); handleMultiSelect(); handleBootstrapSelect(); } }; }();
Save
cmd:
run