Skip to content

Commit

Permalink
https compatible.
Browse files Browse the repository at this point in the history
  • Loading branch information
Taehoon Kang committed Dec 3, 2012
1 parent 92c41bf commit 12a8a28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ def delete(self):
db.run_in_transaction_options(xg_on, self.author.decrease_comment_count)

def delete_item_only(self):
self.author.decrease_comment_count()
super(self.__class__, self).delete()

def save(self):
Expand Down
6 changes: 3 additions & 3 deletions static/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ var ArticleEditor = (function() {
var v = this.stripTags($('#redactor_insert_video_area').val());

if(v.indexOf("http://www.youtube.com/") !== 0) {
booxbox.alert("Not supported URL.");
bootbox.alert("Not supported URL.");
this.modalClose();
return;
}
if (v.match(/watch\?v=(.*)/)) {
if (v.match(/watch\?(.*?)v=/)) {
v = 'http://www.youtube.com/embed/' + v.match(/v=(.*)/)[0].split('=')[1].split("&")[0];
} else if(v.match(/v\/(.*)/)) {
v = 'http://www.youtube.com/embed/' + v.match(/v\/(.*)/)[0].split('=')[1].split("&")[0];
} else {
booxbox.alert("Invalid URL.");
bootbox.alert("Invalid URL.");
this.modalClose();
return;
}
Expand Down
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h1>{% blocktrans with '<span class="current-name"></span>' as holder %}Nothing
<div id="recent" class="span6">{% trans 'Loading...' %}</div>
<div id="external-sns" class="span3">
<div class="fb-activity" data-site="350467444992286" data-app-id="350467444992286" data-width="250" data-height="371" data-border-color="#eee" data-header="true" data-recommendations="true"></div>
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
<script charset="utf-8" src="//widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
Expand Down Expand Up @@ -177,7 +177,7 @@ <h1>{% blocktrans with '<span class="current-name"></span>' as holder %}Nothing

{% block jslib %}
{{ block.super }}
<script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
<script type="text/javascript" src="//www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
{% js 'js/jquery.tagsinput.min.js' %}
{% js 'js/jquery.toastmessage.js' %}
{% js 'js/jquery.history.js' %}
Expand Down

0 comments on commit 12a8a28

Please sign in to comment.