小编Loe*_*oed的帖子

来自Twitter IE7 bug的Bootstrap

我在IE7中创建的网站中发现了一个错误.

网站的网址:http://moldipaints-dokkum.nl/productcontroller/getProductList/19

在IE7中打开产品时,引导模式位于页面后面,灰色叠加层位于顶部.和图像在模态之上.

我改变了以下内容:

css位置:相对/绝对/固定(仅模态未正确显示)

css z-index :(没有任何区别)

潜在的修复Twitter(Github); http://jsfiddle.net/ATeaH/8/

这些都不正确.我能做些什么来完成这项工作?

从项目更新代码

页面渲染

    <?php
    if(isset($productByType)){
        $countwidth = (count($productByType) / 2)*260+100;
    }?>



    <div class="productView">
        <div class="aligndiv">
           <div class="productcenter">
               <div class="productenview">
                   <div class="productcontainer" style="width:<?=@$countwidth?>px;" >
                       <?php
                       if(!empty($productByType)){
                       for($i=0;$i < count($productByType); $i++){

                       $id = $productByType[$i]['id'];
                       $title = $productByType[$i]['title'];
                       $img = base_url('/img/producten/'.$productByType[$i]["img"]);

                       if($i % 2 == 0){
                          echo '<div class="seperatorforproduct">';
                       //0,2,4,6,8
                       }

                    echo '<div class="button btnstyle">';
                    echo '<div class="imgbtn">';    
                    //  <!-- afbeelding -->
                    echo '<img src="'.$img.'" title="'.$title.'" alt="'.$title.'" data-toggle="modal" href="#modal'.$id.'" />'; …
Run Code Online (Sandbox Code Playgroud)

html css jquery twitter-bootstrap

12
推荐指数
1
解决办法
5596
查看次数

模型操作的Sails.js身份验证

我正在制作一个具有不同访问级别的API,"客户端"可能只能阅读.但'admin'必须具有写访问权限.每次将不同的角色作为Sails.js中的策略进行检查,并在req.session中设置权限.

我只需要让'client'无权访问创建,更新和删除操作,因此我创建了一个具有这些CRUD操作的控制器,并检查用户是否具有正确的角色.所有限制访问的操作都会通过routes.js重定向到此控制器.

现在我的问题是,当我删除类似的条目:Category.destroy(req.param('id')); 给我未定义,没有做过方法.与文档提到的不同,我设法通过创建这个来解决问题:

   var deleted = Category.destroy(req.param('id'), function(err, status) { 
    if (status == 1){
      res.json({message: 'Category is deleted'});
    } else {
      res.json({message: 'Oops, something went wrong'});
    }
  });
Run Code Online (Sandbox Code Playgroud)

但必须有另一种方法将身份验证应用于这些基本操作.因为现在我要编写所有动作.

我写的删除函数的代码有什么问题吗?是否可以应用策略并重定向到默认模型操作,就好像根本没有身份验证一样?

authentication mongodb node.js sails.js

6
推荐指数
2
解决办法
7737
查看次数