app/soc/content/js/tips-081027.js
author Pawel Solyga <Pawel.Solyga@gmail.com>
Sun, 01 Feb 2009 16:10:20 +0000
changeset 1152 b82caf7bb17c
parent 1018 02ffb446da6e
child 2025 e44de18a2f5d
permissions -rw-r--r--
Add Google Maps integration for Role profiles create/edit views. Now when editing/creating your Role Profile page Google Maps widget will show up at the bottom of the form as "Location" field. When you type in your Street, City, Country or State it will automatically update the map with the location based on your address. The zoom level depends on the address information you provided. So for example if you just select Country it will be different then when you select both Country and City. The longitude and latitude fields are hidden and are updated with the coordinates from the address you provided. Also if the map is not accurate enough you can adjust your location by dragging the red market, which will change your location and save new coordinates into hidden fields. This patch also includes some style fixes in soc.views.models.role module. Patch by: Mario Ferraro & Pawel Solyga Reviewed by: Pawel Solyga
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
426
114fe0f840c8 Add tooltips style display of help_text, instead of widening the form with
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     1
$(function() {
1018
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     2
  // Change 'title' to something else first
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     3
  $('tr[title]').each(function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     4
    $(this).attr('xtitle', $(this).attr('title')).removeAttr('title');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     5
  })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     6
    .children().children(':input')
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     7
      // Set up event handlers
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     8
      .bt({trigger: ['helperon', 'helperoff'],
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     9
             titleSelector: "parent().parent().attr('xtitle')",
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    10
             killTitle: false,
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    11
             fill: 'rgba(135, 206, 250, .9)',
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    12
             positions: ['bottom', 'top', 'right'],
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    13
          })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    14
      .bind('focus', function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    15
                $(this).trigger('helperon');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    16
              })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    17
      .bind('blur', function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    18
                $(this).trigger('helperoff');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    19
              })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    20
    .parent()
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    21
      .bind('mouseover', function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    22
                $(this).children(':input').trigger('helperon');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    23
              })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    24
      .bind('mouseleave', function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    25
                $(this).children(':input').trigger('helperoff');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    26
              });
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    27
});
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    28