mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
commit
5b0ad6ad9f
@ -10,6 +10,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"fruitcake/laravel-cors": "^2.0"
|
"fruitcake/laravel-cors": "^2.0",
|
||||||
|
"visiosoft/style_selector-module": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,63 @@
|
|||||||
|
{% extends layout('ad-detail') %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{ asset_style("visiosoft.module.advs::css/detail.css") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<section id="main" class="clearfix details-page">
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- admin -->
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/author-button" %}
|
||||||
|
<!-- admin -->
|
||||||
|
|
||||||
|
{% if setting_value('visiosoft.theme.base::breadcrumbs') %}
|
||||||
|
<!-- breadcrumb -->
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/breadcrumb" %}
|
||||||
|
<!-- breadcrumb -->
|
||||||
|
{% endif %}
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/ad-status" %}
|
||||||
|
<h2 class="title">
|
||||||
|
{{ adv.title }}
|
||||||
|
{{ addBlock('ad-detail/title/action',{'adv_id':adv.id})|raw }}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<!--detail-ad -->
|
||||||
|
<div class="section slider mb-4">
|
||||||
|
<div class="row">
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/slider" %}
|
||||||
|
<div class="col-md-5">
|
||||||
|
{% if setting_value('visiosoft.theme.base::ad_details') %}
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/detail" %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--detail-ad -->
|
||||||
|
|
||||||
|
<ul class="docs list-unstyled">
|
||||||
|
{% for doc in adv.doc_files %}
|
||||||
|
<li><a class="text-dark small" href="{{ doc.url }}" download><i
|
||||||
|
class="fa fa-lg fa-download small"></i> {{ doc.name }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{% if setting_value('visiosoft.theme.base::ad_details_tab') %}
|
||||||
|
|
||||||
|
{% if blocks('ad-item-content-block-area') is null %}
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/content" %}
|
||||||
|
{% else %}
|
||||||
|
{{ blocks('ad-item-content-block-area') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ addBlock('ad-detail/widget', {'price': adv.price, 'id': adv.id})|raw }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/dropleft-edit" %}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{{ asset_add("scripts.js", "visiosoft.module.advs::js/viewed.js") }}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@ -1,62 +1 @@
|
|||||||
{% extends layout('ad-detail') %}
|
{% include style_selector('detail','visiosoft.module.advs')~"::ad-detail/default" %}
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{ asset_style("visiosoft.module.advs::css/detail.css") }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section id="main" class="clearfix details-page">
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<!-- admin -->
|
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/author-button" %}
|
|
||||||
<!-- admin -->
|
|
||||||
|
|
||||||
{% if setting_value('visiosoft.theme.base::breadcrumbs') %}
|
|
||||||
<!-- breadcrumb -->
|
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/breadcrumb" %}
|
|
||||||
<!-- breadcrumb -->
|
|
||||||
{% endif %}
|
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/ad-status" %}
|
|
||||||
<h2 class="title">
|
|
||||||
{{ adv.title }}
|
|
||||||
{{ addBlock('ad-detail/title/action',{'adv_id':adv.id})|raw }}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<!--detail-ad -->
|
|
||||||
<div class="section slider mb-4">
|
|
||||||
<div class="row">
|
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/slider" %}
|
|
||||||
<div class="col-md-5">
|
|
||||||
{% if setting_value('visiosoft.theme.base::ad_details') %}
|
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/detail" %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--detail-ad -->
|
|
||||||
|
|
||||||
<ul class="docs list-unstyled">
|
|
||||||
{% for doc in adv.doc_files %}
|
|
||||||
<li><a class="text-dark small" href="{{ doc.url }}" download><i class="fa fa-lg fa-download small"></i> {{ doc.name }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{% if setting_value('visiosoft.theme.base::ad_details_tab') %}
|
|
||||||
|
|
||||||
{% if blocks('ad-item-content-block-area') is null %}
|
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/content" %}
|
|
||||||
{% else %}
|
|
||||||
{{ blocks('ad-item-content-block-area') }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ addBlock('ad-detail/widget', {'price': adv.price, 'id': adv.id})|raw }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include "visiosoft.module.advs::ad-detail/partials/dropleft-edit" %}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/viewed.js") }}
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
@ -13,6 +13,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
{% set form_params = app.request.session.get('_old_input') %}
|
||||||
<section class="clearfix home-default">
|
<section class="clearfix home-default">
|
||||||
|
|
||||||
{% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'new-create'} %}
|
{% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'new-create'} %}
|
||||||
@ -75,7 +76,7 @@
|
|||||||
{% for field in form.fields.translations('name') %}
|
{% for field in form.fields.translations('name') %}
|
||||||
{{ field.setAttributes({
|
{{ field.setAttributes({
|
||||||
'class': 'd-block mt-3 w-100 border-0'
|
'class': 'd-block mt-3 w-100 border-0'
|
||||||
}).render({'form': form})|raw }}
|
}).setValue(form_params[field.field~"_"~field.getLocale()]).render({'form': form})|raw }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
@ -244,7 +245,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="field-group advs_desc">
|
<div class="field-group advs_desc">
|
||||||
{% for field in form.fields.translations('advs_desc') %}
|
{% for field in form.fields.translations('advs_desc') %}
|
||||||
{{ field.render({'form': form})|raw }}
|
{{ field.setValue(form_params[field.field~"_"~field.getLocale()]).render({'form': form})|raw }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -784,7 +784,7 @@ class AdvsController extends PublicController
|
|||||||
if ($this->request->action == "update") {
|
if ($this->request->action == "update") {
|
||||||
$error = $form->build($this->request->update_id)->validate()->getFormErrors()->getMessages();
|
$error = $form->build($this->request->update_id)->validate()->getFormErrors()->getMessages();
|
||||||
if (!empty($error)) {
|
if (!empty($error)) {
|
||||||
return $this->redirect->back();
|
return $this->redirect->back()->withInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update Adv */
|
/* Update Adv */
|
||||||
|
|||||||
@ -5,7 +5,7 @@ let initModal = function () {
|
|||||||
let loading = '<div class="modal-loading"><div class="active loader large"></div></div>';
|
let loading = '<div class="modal-loading"><div class="active loader large"></div></div>';
|
||||||
|
|
||||||
// Loading state
|
// Loading state
|
||||||
modal.on('loading', function() {
|
modal.on('loading', function () {
|
||||||
$(this).find('.modal-content').append(loading);
|
$(this).find('.modal-content').append(loading);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -36,6 +36,25 @@ let initModal = function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Remove onchange event in ajax select field
|
||||||
|
if ($('.table--ajax').find('.table-limit').length > 0) {
|
||||||
|
$('.table--ajax').find('.table-limit').removeAttr("onchange");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle ajax select in modals.
|
||||||
|
$('.table--ajax .table-limit').on('change', function (e) {
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
let wrapper = $(this).closest('.modal-content');
|
||||||
|
|
||||||
|
wrapper.append(loading);
|
||||||
|
|
||||||
|
$.get($(this).val(), function (html) {
|
||||||
|
wrapper.html(html);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Handle ajax forms in modals.
|
// Handle ajax forms in modals.
|
||||||
modal.on('submit', 'form.ajax', function (e) {
|
modal.on('submit', 'form.ajax', function (e) {
|
||||||
|
|
||||||
@ -79,7 +98,7 @@ $(document).ajaxComplete(function () {
|
|||||||
$(document).on('show.bs.modal', '.modal', function () {
|
$(document).on('show.bs.modal', '.modal', function () {
|
||||||
let zIndex = 1040 + (10 * $('.modal:visible').length);
|
let zIndex = 1040 + (10 * $('.modal:visible').length);
|
||||||
$(this).css('z-index', zIndex);
|
$(this).css('z-index', zIndex);
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
$('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack');
|
$('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack');
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user