mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 15:26:10 -06:00
Merge pull request #688 from openclassify/vedat
create addBlock ajax service && added profile ads block
This commit is contained in:
commit
21c0eae1aa
@ -21,6 +21,8 @@
|
||||
|
||||
{{ asset_script("theme.js") }}
|
||||
|
||||
{{ addBlock('theme/partials/assets/additional-assets')|raw }}
|
||||
|
||||
{# Include Styles Loaded From Outside #}
|
||||
<style>
|
||||
{% for style in asset_inlines("styles.css", ["min"]) %}
|
||||
|
||||
@ -4,24 +4,21 @@ var ads_type = "";
|
||||
|
||||
var objJson = [];
|
||||
|
||||
function prevPage()
|
||||
{
|
||||
function prevPage() {
|
||||
if (current_page > 1) {
|
||||
current_page--;
|
||||
changePage(current_page);
|
||||
}
|
||||
}
|
||||
|
||||
function nextPage(event)
|
||||
{
|
||||
function nextPage(event) {
|
||||
if (current_page < numPages()) {
|
||||
current_page++;
|
||||
changePage(current_page);
|
||||
}
|
||||
}
|
||||
|
||||
function changePage(page)
|
||||
{
|
||||
function changePage(page) {
|
||||
var btn_next = $("#btn_next");
|
||||
var btn_prev = $("#btn_prev");
|
||||
var listing_table = $("#nav-" + ads_type);
|
||||
@ -65,8 +62,7 @@ function changePage(page)
|
||||
}
|
||||
}
|
||||
|
||||
function numPages()
|
||||
{
|
||||
function numPages() {
|
||||
return Math.ceil(objJson.length / records_per_page);
|
||||
}
|
||||
|
||||
@ -164,7 +160,7 @@ function dropdownRow(id, type) {
|
||||
extend_ad +
|
||||
"</a>\n";
|
||||
|
||||
dropdown += "</div></div>";
|
||||
dropdown += getBlock('profile/dropdown-ad', {'id': id}) + "</div></div>";
|
||||
return dropdown;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user