Sha256: a26ce1e52caf5f669b141a198c5342e3724207f4447576d83571af0f11d15ca8

Contents?: true

Size: 1.16 KB

Versions: 18

Compression:

Stored size: 1.16 KB

Contents

//Contains bottom view as key and a the values are also a hash
//that contains the 'top' thing
//{
//  'nav_container' =>
//    {
//      'nav_container' => 'name'
//    }
//}
int_segue_interceptors = {
}

//Contains an array 

//Register a segue intercept
//name - The name of the segue to be given if_segue_do
//from_view_name - The name of the bottom view to intercept
//to_view_name - The name of the top view to intercept

function reg(name, from_view_name, to_view_name) {
  //Create hash if it dosen't already exist
  int_segue_interceptors[from_view_name] = int_segue_interceptors[from_view_name] || {};
  int_segue_interceptors[from_view_name][to_view_name] = name;
}

//Will send the 'if' commands
function intercept_if_necessary(bottom_view_name, top_view_name, from_vp, to_vp) {
  console.log("Intercept if necessars")
  if (int_segue_interceptors[bottom_view_name] && int_segue_interceptors[bottom_view_name][top_view_name]) {
    var rez = int_segue_interceptors[bottom_view_name][top_view_name];

    SEND("main", "if_segue_do", rez, from_vp, to_vp);
  }
}

reg("modal", "nav_container", "nav_container.detach");
reg("unmodal", "nav_container", "nav_container.attach");

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
flok-0.0.33 app/kern/mod/segue.js
flok-0.0.32 app/kern/mod/segue.js
flok-0.0.31 app/kern/mod/segue.js
flok-0.0.30 app/kern/mod/segue.js
flok-0.0.29 app/kern/mod/segue.js
flok-0.0.28 app/kern/mod/segue.js
flok-0.0.27 app/kern/mod/segue.js
flok-0.0.26 app/kern/mod/segue.js
flok-0.0.25 app/kern/mod/segue.js
flok-0.0.24 app/kern/mod/segue.js
flok-0.0.23 app/kern/mod/segue.js
flok-0.0.21 app/kern/mod/segue.js
flok-0.0.20 app/kern/mod/segue.js
flok-0.0.19 app/kern/mod/segue.js
flok-0.0.18 app/kern/mod/segue.js
flok-0.0.17 app/kern/mod/segue.js
flok-0.0.16 app/kern/mod/segue.js
flok-0.0.14 app/kern/mod/segue.js