<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[1452] sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js: WP.org Themes: Remove unused code.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/1452">1452</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/1452","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>obenland</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-03-25 23:34:24 +0000 (Wed, 25 Mar 2015)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>WP.org Themes: Remove unused code.

Leftovers from THX merge in <a href="http://meta.trac.wordpress.org/changeset/1434">r1434</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesjsthemejs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesjsthemejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js      2015-03-25 17:27:11 UTC (rev 1451)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js        2015-03-25 23:34:24 UTC (rev 1452)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,7 +119,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        // Set up the Collection for our theme data
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        // @has 'id' 'name' 'screenshot' 'author' 'authorURI' 'version' 'active' ...
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // @has 'id' 'name' 'screenshot' 'author' 'authorURI' 'version' ...
</ins><span class="cx" style="display: block; padding: 0 10px">         themes.Collection = Backbone.Collection.extend({
</span><span class="cx" style="display: block; padding: 0 10px">                model: themes.Model,
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -384,14 +384,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        });
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Adds a class to the currently active theme
-               // and to the overlay in detailed view mode
-               activeTheme: function() {
-                       if ( this.model.get( 'active' ) ) {
-                               this.$el.addClass( 'active' );
-                       }
-               },
-
</del><span class="cx" style="display: block; padding: 0 10px">                 // Add class of focus to the theme we are focused on.
</span><span class="cx" style="display: block; padding: 0 10px">                addFocus: function() {
</span><span class="cx" style="display: block; padding: 0 10px">                        var $themeToFocus = ( $( ':focus' ).hasClass( 'theme' ) ) ? $( ':focus' ) : $(':focus').parents('.theme');
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -437,136 +429,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                preventExpand: function() {
</span><span class="cx" style="display: block; padding: 0 10px">                        this.touchDrag = true;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                },
-
-               preview: function( event ) {
-                       var self = this,
-                               current, preview;
-
-                       // Bail if the user scrolled on a touch device
-                       if ( this.touchDrag === true ) {
-                               return this.touchDrag = false;
-                       }
-
-                       // Allow direct link path to installing a theme.
-                       if ( $( event.target ).hasClass( 'button-primary' ) ) {
-                               return;
-                       }
-
-                       // 'enter' and 'space' keys expand the details view when a theme is :focused
-                       if ( event.type === 'keydown' && ( event.which !== 13 && event.which !== 32 ) ) {
-                               return;
-                       }
-
-                       // pressing enter while focused on the buttons shouldn't open the preview
-                       if ( event.type === 'keydown' && event.which !== 13 && $( ':focus' ).hasClass( 'button' ) ) {
-                               return;
-                       }
-
-                       event.preventDefault();
-
-                       event = event || window.event;
-
-                       // Set focus to current theme.
-                       themes.focusedTheme = this.$el;
-
-                       // Construct a new Preview view.
-                       preview = new themes.view.Preview({
-                               model: this.model
-                       });
-
-                       // Render the view and append it.
-                       preview.render();
-                       this.setNavButtonsState();
-
-                       // Hide previous/next navigation if there is only one theme
-                       if ( this.model.collection.length === 1 ) {
-                               preview.$el.addClass( 'no-navigation' );
-                       } else {
-                               preview.$el.removeClass( 'no-navigation' );
-                       }
-
-                       // Append preview
-                       $( 'div.wrap' ).append( preview.el );
-
-                       // Listen to our preview object
-                       // for `theme:next` and `theme:previous` events.
-                       this.listenTo( preview, 'theme:next', function() {
-
-                               // Keep local track of current theme model.
-                               current = self.model;
-
-                               // If we have ventured away from current model update the current model position.
-                               if ( ! _.isUndefined( self.current ) ) {
-                                       current = self.current;
-                               }
-
-                               // Get next theme model.
-                               self.current = self.model.collection.at( self.model.collection.indexOf( current ) + 1 );
-
-                               // If we have no more themes, bail.
-                               if ( _.isUndefined( self.current ) ) {
-                                       self.options.parent.parent.trigger( 'theme:end' );
-                                       return self.current = current;
-                               }
-
-                               preview.model = self.current;
-
-                               // Render and append.
-                               preview.render();
-                               this.setNavButtonsState();
-                               $( '.next-theme' ).focus();
-                       })
-                               .listenTo( preview, 'theme:previous', function() {
-
-                                       // Keep track of current theme model.
-                                       current = self.model;
-
-                                       // Bail early if we are at the beginning of the collection
-                                       if ( self.model.collection.indexOf( self.current ) === 0 ) {
-                                               return;
-                                       }
-
-                                       // If we have ventured away from current model update the current model position.
-                                       if ( ! _.isUndefined( self.current ) ) {
-                                               current = self.current;
-                                       }
-
-                                       // Get previous theme model.
-                                       self.current = self.model.collection.at( self.model.collection.indexOf( current ) - 1 );
-
-                                       // If we have no more themes, bail.
-                                       if ( _.isUndefined( self.current ) ) {
-                                               return;
-                                       }
-
-                                       preview.model = self.current;
-
-                                       // Render and append.
-                                       preview.render();
-                                       this.setNavButtonsState();
-                                       $( '.previous-theme' ).focus();
-                               });
-
-                       this.listenTo( preview, 'preview:close', function() {
-                               self.current = self.model;
-                       });
-               },
-
-               // Handles .disabled classes for previous/next buttons in theme installer preview
-               setNavButtonsState: function() {
-                       var $themeInstaller = $( '.theme-install-overlay' ),
-                               current = _.isUndefined( this.current ) ? this.model : this.current;
-
-                       // Disable previous at the zero position
-                       if ( 0 === this.model.collection.indexOf( current ) ) {
-                               $themeInstaller.find( '.previous-theme' ).addClass( 'disabled' );
-                       }
-
-                       // Disable next if the next model is undefined
-                       if ( _.isUndefined( this.model.collection.at( this.model.collection.indexOf( current ) + 1 ) ) ) {
-                               $themeInstaller.find( '.next-theme' ).addClass( 'disabled' );
-                       }
</del><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px">        });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -578,7 +440,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                events: {
</span><span class="cx" style="display: block; padding: 0 10px">                        'click': 'collapse',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'click .delete-theme': 'deleteTheme',
</del><span class="cx" style="display: block; padding: 0 10px">                         'click .left': 'previousTheme',
</span><span class="cx" style="display: block; padding: 0 10px">                        'click .right': 'nextTheme',
</span><span class="cx" style="display: block; padding: 0 10px">                        'click .theme-actions .button-secondary': 'preview',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -602,8 +463,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        }).join( ', ' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        this.$el.html( this.html( data ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        // Renders active theme styles
-                       this.activeTheme();
</del><span class="cx" style="display: block; padding: 0 10px">                         // Set up navigation events
</span><span class="cx" style="display: block; padding: 0 10px">                        this.navigation();
</span><span class="cx" style="display: block; padding: 0 10px">                        // Checks screenshot size
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -746,13 +605,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Adds a class to the currently active theme
-               // and to the overlay in detailed view mode
-               activeTheme: function() {
-                       // Check the model has the active property
-                       this.$el.toggleClass( 'active', this.model.get( 'active' ) );
-               },
-
</del><span class="cx" style="display: block; padding: 0 10px">                 // Keeps :focus within the theme details elements.
</span><span class="cx" style="display: block; padding: 0 10px">                containFocus: function( $el ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        var ev = window.event,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -918,11 +770,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        this.trigger( 'theme:collapse' );
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Confirmation dialog for deleting a theme
-               deleteTheme: function() {
-                       return confirm( themes.data.settings.confirmDelete );
-               },
-
</del><span class="cx" style="display: block; padding: 0 10px">                 nextTheme: function() {
</span><span class="cx" style="display: block; padding: 0 10px">                        var self = this;
</span><span class="cx" style="display: block; padding: 0 10px">                        self.trigger( 'theme:next', self.model.cid );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1040,13 +887,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        // Set current view to [grid]
</span><span class="cx" style="display: block; padding: 0 10px">                        this.setView( 'grid' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        // Move the active theme to the beginning of the collection
-                       self.currentTheme();
-
</del><span class="cx" style="display: block; padding: 0 10px">                         // When the collection is updated by user input...
</span><span class="cx" style="display: block; padding: 0 10px">                        this.listenTo( self.collection, 'update', function() {
</span><span class="cx" style="display: block; padding: 0 10px">                                self.parent.page = 0;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                self.currentTheme();
</del><span class="cx" style="display: block; padding: 0 10px">                                 self.render( this );
</span><span class="cx" style="display: block; padding: 0 10px">                        });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1168,20 +1011,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        this.parent.page++;
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Grabs current theme and puts it at the beginning of the collection
-               currentTheme: function() {
-                       var self = this,
-                               current;
-
-                       current = self.collection.findWhere({ active: true });
-
-                       // Move the active theme to the beginning of the collection
-                       if ( current ) {
-                               self.collection.remove( current );
-                               self.collection.add( current, { at:0 } );
-                       }
-               },
-
</del><span class="cx" style="display: block; padding: 0 10px">                 // Sets current view
</span><span class="cx" style="display: block; padding: 0 10px">                setView: function( view ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        return view;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1703,8 +1532,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                request.theme = slug;
</span><span class="cx" style="display: block; padding: 0 10px">                                self.view.collection.query( request );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-                               $( '.close-full-overlay' ).trigger( 'click' );
</del><span class="cx" style="display: block; padding: 0 10px">                                 self.view.view.expand( slug );
</span><span class="cx" style="display: block; padding: 0 10px">                        });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre>
</div>
</div>

</body>
</html>