mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-26 04:51:08 -05:00
spamadmin for bootstrap
This commit is contained in:
parent
6d00897ed1
commit
0a088ea08e
@ -45,7 +45,7 @@ class Spamadmin extends CI_Controller
|
|||||||
$this->db->where('pid', $pid);
|
$this->db->where('pid', $pid);
|
||||||
$this->db->delete('pastes');
|
$this->db->delete('pastes');
|
||||||
}
|
}
|
||||||
redirect(site_url('spamadmin'));
|
redirect(site_url('spamadmin/' . $this->uri->segment(2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//render view
|
//render view
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden, .inv {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,3 +127,11 @@ table.table thead .sorting_desc_disabled { background: url('../images/sort_desc_
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-selectable>.ui-selected { background-color: #a6c9e2; }
|
||||||
|
.ui-selectable>.ui-selecting { background: #FECA40; }
|
||||||
|
|
||||||
|
.ui-selectable-helper {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 100;
|
||||||
|
border:1px dotted black;
|
||||||
|
}
|
6
htdocs/themes/bootstrap/js/jquery-ui-selectable-combined.min.js
vendored
Normal file
6
htdocs/themes/bootstrap/js/jquery-ui-selectable-combined.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -16,6 +16,48 @@ ST.show_embed = function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ST.spamadmin = function() {
|
||||||
|
if ($('.content h1').text() == 'Spamadmin') {
|
||||||
|
$('.content .hidden').show();
|
||||||
|
$('.content .quick_remove').live('click', function(ev) {
|
||||||
|
var ip = $(ev.target).data('ip');
|
||||||
|
if (confirm('Delete all pastes belonging to ' + ip + '?')) {
|
||||||
|
$.post(base_url + 'spamadmin/' + ip, {
|
||||||
|
'confirm_remove': 'yes',
|
||||||
|
'block_ip': 1
|
||||||
|
}, function() {
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// needed by .selectable
|
||||||
|
$.fn.addBack = function(selector) {
|
||||||
|
return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector));
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.selectable>tbody').selectable({
|
||||||
|
filter: 'tr',
|
||||||
|
cancel: 'a',
|
||||||
|
stop: function() {
|
||||||
|
var $deletestack = $(".paste_deletestack");
|
||||||
|
var $input = $("input[name=pastes_to_delete]");
|
||||||
|
$('.inv').show();
|
||||||
|
$deletestack.empty();
|
||||||
|
$input.empty();
|
||||||
|
var res = [];
|
||||||
|
$(".ui-selected").each(function(i, el) {
|
||||||
|
var id = $('a', el).attr('href').split('view/')[1];
|
||||||
|
res.push(id);
|
||||||
|
});
|
||||||
|
$deletestack.text(res.join(' '));
|
||||||
|
$input.val(res.join(' '));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
ST.line_highlighter = function() {
|
ST.line_highlighter = function() {
|
||||||
var org_href = window.location.href.replace(/(.*?)#(.*)/, '$1');
|
var org_href = window.location.href.replace(/(.*?)#(.*)/, '$1');
|
||||||
var first_line = false;
|
var first_line = false;
|
||||||
@ -293,6 +335,7 @@ ST.clickable_urls = function() {
|
|||||||
|
|
||||||
ST.init = function() {
|
ST.init = function() {
|
||||||
ST.show_embed();
|
ST.show_embed();
|
||||||
|
ST.spamadmin();
|
||||||
ST.line_highlighter();
|
ST.line_highlighter();
|
||||||
ST.crypto();
|
ST.crypto();
|
||||||
ST.dragdrop();
|
ST.dragdrop();
|
||||||
|
@ -18,6 +18,7 @@ if(isset($ace_modes)){
|
|||||||
//Javascript
|
//Javascript
|
||||||
$this->carabiner->js('jquery.js');
|
$this->carabiner->js('jquery.js');
|
||||||
$this->carabiner->js('jquery.timers.js');
|
$this->carabiner->js('jquery.timers.js');
|
||||||
|
$this->carabiner->js('jquery-ui-selectable-combined.min.js');
|
||||||
$this->carabiner->js('bootstrap.min.js');
|
$this->carabiner->js('bootstrap.min.js');
|
||||||
$this->carabiner->js('crypto-js/rollups/aes.js');
|
$this->carabiner->js('crypto-js/rollups/aes.js');
|
||||||
$this->carabiner->js('lz-string-1.3.3-min.js');
|
$this->carabiner->js('lz-string-1.3.3-min.js');
|
||||||
|
@ -9,10 +9,8 @@
|
|||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<?php echo $page['title']; ?>
|
<?php echo $page['title']; ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<form action="<?php echo base_url(); ?>" method="post" class="form-vertical well">
|
<form action="<?php echo base_url(); ?>" method="post" class="form-vertical well">
|
||||||
@ -20,19 +18,15 @@
|
|||||||
<div class="span3">
|
<div class="span3">
|
||||||
<label for="name"><?php echo lang('paste_author'); ?>
|
<label for="name"><?php echo lang('paste_author'); ?>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php $set = array('name' => 'name', 'id' => 'name', 'class' => 'span3', 'value' => $name_set, 'maxlength' => '32', 'tabindex' => '1');
|
<?php $set = array('name' => 'name', 'id' => 'name', 'class' => 'span3', 'value' => $name_set, 'maxlength' => '32', 'tabindex' => '1');
|
||||||
echo form_input($set);?>
|
echo form_input($set);?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<label for="title">
|
<label for="title">
|
||||||
<?php echo lang('paste_title'); ?>
|
<?php echo lang('paste_title'); ?>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input value="<?php if(isset($title_set)){ echo $title_set; }?>" class="span3" type="text" id="title" name="title" tabindex="2" maxlength="50" />
|
<input value="<?php if(isset($title_set)){ echo $title_set; }?>" class="span3" type="text" id="title" name="title" tabindex="2" maxlength="50" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<label for="lang">
|
<label for="lang">
|
||||||
<?php echo lang('paste_lang'); ?>
|
<?php echo lang('paste_lang'); ?>
|
||||||
@ -40,7 +34,6 @@
|
|||||||
<?php $lang_extra = 'id="lang" class="select span3" tabindex="3"'; echo form_dropdown('lang', $languages, $lang_set, $lang_extra); ?>
|
<?php $lang_extra = 'id="lang" class="select span3" tabindex="3"'; echo form_dropdown('lang', $languages, $lang_set, $lang_extra); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<label for="code"><?php echo lang('paste_yourpaste'); ?>
|
<label for="code"><?php echo lang('paste_yourpaste'); ?>
|
||||||
@ -109,11 +102,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if($reply){ ?>
|
<?php if($reply){ ?>
|
||||||
<input type="hidden" value="<?php echo $reply; ?>" name="reply" />
|
<input type="hidden" value="<?php echo $reply; ?>" name="reply" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if($this->config->item('enable_captcha') && $this->session->userdata('is_human') === null){ ?>
|
<?php if($this->config->item('enable_captcha') && $this->session->userdata('is_human') === null){ ?>
|
||||||
<div class="item_group">
|
<div class="item_group">
|
||||||
<div class="item item_captcha">
|
<div class="item item_captcha">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user