/[drupal]/contributions/modules/contemplate/divresizer.js
ViewVC logotype

Contents of /contributions/modules/contemplate/divresizer.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Dec 12 18:14:26 2006 UTC (2 years, 11 months ago) by jjeff
Branch: MAIN
CVS Tags: DRUPAL-5--1-6, DRUPAL-5--1-2, DRUPAL-5--2-0, DRUPAL-5--1-9, DRUPAL-5--1-8, DRUPAL-6--0-11, DRUPAL-6--0-10, DRUPAL-6--0-13, DRUPAL-6--0-12, DRUPAL-6--0-4-1, DRUPAL-6--0-4-2, DRUPAL-5--5-1-1, DRUPAL-5--1-2-1, DRUPAL-5--1-5, DRUPAL-5--1-8-beta2, DRUPAL-5--1-7, DRUPAL-5--1-1, DRUPAL-6--0-1, DRUPAL-6--2-01, DRUPAL-6--0-3, DRUPAL-6--0-2, DRUPAL-6--0-5, DRUPAL-6--0-4, DRUPAL-6--0-7, DRUPAL-6--0-6, DRUPAL-6--0-9, DRUPAL-6--0-8, DRUPAL-5--1-8-beta1, DRUPAL-5--1-0, DRUPAL-5--1-3, DRUPAL-5--2-04, DRUPAL-5--2-03, DRUPAL-5--2-02, DRUPAL-5--2-01, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/javascript
Major update to ConTemplate module. Adds separate field for RSS modification. Also, teaser, body, and rss are now individually enableable. Template tab appears on content/types/[type] pages. Node object divs are now resizable.
1 Drupal.contemplate.divResizable = function() {
2 $('div.resizable:not(.processed)').each(function() {
3 var div = $(this).addClass('processed'), staticOffset = null;
4
5 $(this).wrap('<div class="resizable-textarea"></div>')
6 .parent().append($('<div class="grippie"></div>').mousedown(startDrag));
7
8 var grippie = $('div.grippie', $(this).parent())[0];
9 grippie.style.marginRight = (grippie.offsetWidth - $(this)[0].offsetWidth) +'px';
10
11 function startDrag(e) {
12 staticOffset = div.height() - Drupal.mousePosition(e).y;
13 div.css('opacity', 0.25);
14 $(document).mousemove(performDrag).mouseup(endDrag);
15 return false;
16 }
17
18 function performDrag(e) {
19 div.height(Math.max(32, staticOffset + Drupal.mousePosition(e).y) + 'px');
20 return false;
21 }
22
23 function endDrag(e) {
24 $(document).unmousemove(performDrag).unmouseup(endDrag);
25 div.css('opacity', 1);
26 }
27 });
28 }
29
30 if (Drupal.jsEnabled) {
31 $(document).ready(Drupal.contemplate.divResizable);
32 }

  ViewVC Help
Powered by ViewVC 1.1.2