web/data/cubicweb.tabs.js
author Aurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 27 Jan 2009 18:46:49 +0100
changeset 485 0f830732be19
parent 239 5b58fd1aba50
child 491 e6d025d7d313
permissions -rw-r--r--
[tabs] provide a working tabs implementation, that lazy-loads tab content & should remember the current position
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
239
5b58fd1aba50 missing file
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     1
function set_tab(tabname) {
5b58fd1aba50 missing file
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     2
  // set appropriate cookie
5b58fd1aba50 missing file
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     3
  // XXX see if we can no just do it with jQuery
5b58fd1aba50 missing file
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     4
  async_remote_exec('remember_active_tab', tabname);
485
0f830732be19 [tabs] provide a working tabs implementation, that lazy-loads tab content & should remember the current position
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 239
diff changeset
     5
  // trigger show + tabname event
0f830732be19 [tabs] provide a working tabs implementation, that lazy-loads tab content & should remember the current position
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 239
diff changeset
     6
  log('set tab for ' + jQuery('#lazy-' + tabname).attr('cubicweb:loadurl'));
0f830732be19 [tabs] provide a working tabs implementation, that lazy-loads tab content & should remember the current position
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 239
diff changeset
     7
  trigger_load(tabname);
239
5b58fd1aba50 missing file
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     8
}