Plugin Directory

Changeset 699228

Timestamp:
04/17/2013 05:40:49 PM (11 years ago)
Author:
jblz
Message:

Jetpack: Notes Module:

  • Enqueue v2 scripts and style
  • Prefix module-specific scripts and style to prevent collision
  • Include lang and dir attributes on #wpnt-notes-panel so the notifications iframe can use these to display correctly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/notes.php

    r697833 r699228  
    123123
    124124    function styles_and_scripts() {
    125         wp_enqueue_style( 'notes-admin-bar-rest', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/admin-bar-rest.css' ), array(), JETPACK_NOTES__CACHE_BUSTER );
     125        wp_enqueue_style( '.css' ), array(), JETPACK_NOTES__CACHE_BUSTER );
    126126        wp_enqueue_style( 'noticons', $this->wpcom_static_url( '/i/noticons/noticons.css' ), array(), JETPACK_NOTES__CACHE_BUSTER );
    127127
     
    139139        }
    140140
    141         wp_register_script( 'notes-rest-common', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/notes-rest-common.js' ), array( 'jquery', 'underscore', 'backbone', 'mustache', 'jquery.spin' ), JETPACK_NOTES__CACHE_BUSTER );
    142         wp_enqueue_script( 'notes-admin-bar-rest', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/admin-bar-rest.js' ), array( 'notes-rest-common' ), JETPACK_NOTES__CACHE_BUSTER );
     141        wp_register_script( '.js' ), array( 'jquery', 'underscore', 'backbone', 'mustache', 'jquery.spin' ), JETPACK_NOTES__CACHE_BUSTER );
     142        wp_enqueue_script( '-common' ), JETPACK_NOTES__CACHE_BUSTER );
    143143    }
    144144
     
    156156                    </span>',
    157157            'meta'   => array(
    158                 'html'  => '<div id="wpnt-notes-panel" style="display:none"><div class="wpnt-notes-panel-header"><span class="wpnt-notes-header">' . __('Notifications', 'jetpack') . '</span><span class="wpnt-notes-panel-link"></span></div></div>',
     158                'html'  => '<div id="wpnt-notes-panel" style="display:none") . '</span><span class="wpnt-notes-panel-link"></span></div></div>',
    159159                'class' => 'menupop',
    160160            ),
Note: See TracChangeset for help on using the changeset viewer.