Valerii Vasin (valerii) wrote in changelog,
Valerii Vasin
valerii
changelog

[livejournal] r23394: LJSUP-13980: [Friends Feed] Remove setti...

Committer: vvasin
LJSUP-13980: [Friends Feed] Remove settings for friends page. Remove old javascript.
U   trunk/cgi-bin/LJ/Widget/JournalTitles.pm
Modified: trunk/cgi-bin/LJ/Widget/JournalTitles.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/JournalTitles.pm	2012-11-29 12:03:37 UTC (rev 23393)
+++ trunk/cgi-bin/LJ/Widget/JournalTitles.pm	2012-11-29 12:56:00 UTC (rev 23394)
@@ -6,7 +6,11 @@
 
 sub ajax { 1 }
 sub authas { 1 }
-sub need_res { qw( stc/widgets/journaltitles.css ) }
+sub need_res { qw(
+        stc/widgets/journaltitles.css
+        js/jquery/customize/jquery.lj.journalTitles.js
+    )
+}
 
 sub render_body {
     my $class = shift;
@@ -59,90 +63,4 @@
     return;
 }
 
-sub js {
-    q [
-        initWidget: function () {
-            var self = this;
-
-            // store current field values
-            self.journaltitle_value = $("journaltitle").value;
-            self.journalsubtitle_value = $("journalsubtitle").value;
-            self.friendspagetitle_value = $("friendspagetitle").value;
-
-            // show view mode
-            $("journaltitle_view").style.display = "inline";
-            $("journalsubtitle_view").style.display = "inline";
-            $("friendspagetitle_view").style.display = "inline";
-            $("journaltitle_cancel").style.display = "inline";
-            $("journalsubtitle_cancel").style.display = "inline";
-            $("friendspagetitle_cancel").style.display = "inline";
-            $("journaltitle_modify").style.display = "none";
-            $("journalsubtitle_modify").style.display = "none";
-            $("friendspagetitle_modify").style.display = "none";
-
-            // set up edit links
-            DOM.addEventListener($("journaltitle_edit"), "click", function (evt) { self.editTitle(evt, "journaltitle") });
-            DOM.addEventListener($("journalsubtitle_edit"), "click", function (evt) { self.editTitle(evt, "journalsubtitle") });
-            DOM.addEventListener($("friendspagetitle_edit"), "click", function (evt) { self.editTitle(evt, "friendspagetitle") });
-
-            // set up cancel links
-            DOM.addEventListener($("journaltitle_cancel"), "click", function (evt) { self.cancelTitle(evt, "journaltitle") });
-            DOM.addEventListener($("journalsubtitle_cancel"), "click", function (evt) { self.cancelTitle(evt, "journalsubtitle") });
-            DOM.addEventListener($("friendspagetitle_cancel"), "click", function (evt) { self.cancelTitle(evt, "friendspagetitle") });
-
-            // set up save forms
-            DOM.addEventListener($("journaltitle_form"), "submit", function (evt) { self.saveTitle(evt, "journaltitle") });
-            DOM.addEventListener($("journalsubtitle_form"), "submit", function (evt) { self.saveTitle(evt, "journalsubtitle") });
-            DOM.addEventListener($("friendspagetitle_form"), "submit", function (evt) { self.saveTitle(evt, "friendspagetitle") });
-        },
-        editTitle: function (evt, id) {
-            $(id + "_modify").style.display = "inline";
-            $(id + "_view").style.display = "none";
-
-            // cancel any other titles that are being edited since
-            // we only want one title in edit mode at a time
-            if (id == "journaltitle") {
-                this.cancelTitle(evt, "journalsubtitle");
-                this.cancelTitle(evt, "friendspagetitle");
-            } else if (id == "journalsubtitle") {
-                this.cancelTitle(evt, "journaltitle");
-                this.cancelTitle(evt, "friendspagetitle");
-            } else if (id == "friendspagetitle") {
-                this.cancelTitle(evt, "journaltitle");
-                this.cancelTitle(evt, "journalsubtitle");
-            }
-
-            Event.stop(evt);
-        },
-        cancelTitle: function (evt, id) {
-            $(id + "_modify").style.display = "none";
-            $(id + "_view").style.display = "inline";
-
-            // reset appropriate field to default
-            if (id == "journaltitle") {
-                $("journaltitle").value = this.journaltitle_value;
-            } else if (id == "journalsubtitle") {
-                $("journalsubtitle").value = this.journalsubtitle_value;
-            } else if (id == "friendspagetitle") {
-                $("friendspagetitle").value = this.friendspagetitle_value;
-            }
-
-            Event.stop(evt);
-        },
-        saveTitle: function (evt, id) {
-            $("save_btn_" + id).disabled = true;
-
-            this.doPostAndUpdateContent({
-                which_title: id,
-                title_value: $(id).value
-            });
-
-            Event.stop(evt);
-        },
-        onRefresh: function (data) {
-            this.initWidget();
-        }
-    ];    
-}
-
 1;

Tags: invis89, livejournal, pm, vvasin
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments